How do you add a link to a .swf file?

Is there a way to add a link/URL to a .swf file, without embedding into the original .fla file?
Is there any way to do that with just the .swf file alone, and without actually editing the .fla or re-creating it?

I won't be providing lessons, but here's the basics...  to load the other swf file using AS3 you will use code like the following in the main timeline...
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("theOther.swf"));
addChild(my_loader);
addChild(myBtn); // described next but coded here
To add a link, you can create an invisible button and place whereever you like in the timeline, or if its a text link you can assign the link to the dynamic textfield via the properties panel.  To create an invisible button just create a button symbol and draw a shape for it only in its Hit frame, leaving all other empty... that way you can still see the button to work with it on the stage, but it will be invisible when the file plays.  You could also have the button include text or any other visual you desire if you don't need/want it to be invisible.
If you use the button approach, then you need to assign the button an instance name (I use "myBtn" for this example)  Then you have to assign an event listener and event handler function for the button...
myBtn.addEventListener(MouseEvent.CLICK, clickBtn);
function clickBtn(evt:MouseEvent):void {
     navigateToURL(new URLRequest("http://www.yourlinksurl.com/etc"));
The reason I addChild for myBtn after I addChild the Loader is so that it will sit above the Loader.  Without that line, the Loader would have the loaded swf sitting atop the button blocking access to it.
If you plan to use a Textfield instead of a button, then you don't need the event code but you still need the addChild() line to bring it in front.  As mentioned already you can link it via the properties panel field for a link.  To make life simple per these instructions just assign the textfield an instance name of myBtn.

Similar Messages

  • How do you add a controller to a SWF file?

    I am a newbie.
    How would I add a controller for play and pause to a SWF
    file? I want to put several SWF files up on a website but want to
    be able to control them. Instead they all play once the web page
    loads.
    Please help.
    Thanks

    > What is need is a %LinksDir% variable.
    I have no client available with links redirected, but basically, this
    should result in a registry value containing the new path. Simply
    regedit and search for your "links" redirection path.
    Then use Item Level targeting "registry value" to store this path in a
    temporary variable that you can use in the target path for your shortcut.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • How do you make a link in a .pdf file? (Adobe Acrobat 8 Professional)

    Dear Adobe Acrobat Forum,
    I would like to add a link to my .pdf file.
    Once clicked on, I would like the link to send the user to another place in the same .pdf file
    or open a separate .pdf file.
    I've tried to resolve this on my own by going to both Acrobat help section and the InDesign help section as well as Googling "Acrobat 8 link" or something similar.......but to no avail.
    So, can you please tell me how I can add a link to a .pdf file?
    I'm using Adobe Acrobat 8 Professional.
    I have been creating .pdf files using the File > Export feature in Adobe InDesign CS3 (for the Mac).
    Thanks!

    Have you tried in Acrobat 8 to:
    Choose Link tool.
    Then choose as shown on as on this Graphic
    Then when clicking next you should be greeted with this:
    Choose open a file or open a weblink depending upon what you want to do.
    You try some of the other choices. once you select what to do save as a copy and try. If This one doesn't work try some of the other choices in the first graphic. other panes will open up similar to second graphic except there will be other choices.

  • How do you add a watermark to a protected file?

    How do you add a watermark to a protected file?

    Hi whobrew,
    Without the Document Permissions password, you won't be able to add a watermark to the PDF.
    Please let us know if you have additional questions.
    Best,
    Sara

  • How do you add a link to another website in you PDF using LiveCycle?

    Can you add a link in your PDF in livecycle that opens a new window that that takes you to a predetermined website?

    There may be simpler ways, but this is how I made my button.
    Add the button.On the Object palette>Field page change appearnce of button to have no outline and no fill. Highlight the text and on the Font and paragraph palettes choose the correct look for your text (blue and underlined plus anything else you want) and change the text to what you want the link to say.
    Then to add the URL, open your script editor (Window>Script editor) & choose "Langauge:Javascript" and "Run at:Client".
    With the button chosen, choose the CLICK event (from drop down list, beside "Show") add the script:
    app.launchURL("http://AND THIS IS WHERE YOU ADD YOUR OWN URL")
    Hope that is helpful

  • How do you Add a Link in Nav. Bar to a different site?

    I would like to add a link to the Nav Bar that goes to a location of my choice. Is that possible in iWeb? If So, how?
    Thanks
    Neil

    Here's a way to do it:
    1 - create a blank page with the name you want to appear in the navbar.
    2 - publish the site.
    3 - edit the html file of the page and put the following in the head section of the file:
    <meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com">.
    Replace the “0” with the number of seconds you would like to pass before the redirection takes place. Put in the URL of your destination site.
    As long as you never make any more changes to that page or use the Publish All to MobileMe option you won't have to reedit the html file and add the code all over again. This is a demo of that feature with an 8 second lag.
    Now the external page will be in your navbar.
    OT

  • How do you add a link to an image item

    I have added an Image Item to a page and want to be able to add a link to that image but dont see any where you can put the link in the Image Item properties

    One easy way to do this would be to add an image page, upload your image to the page, then create an html portlet with the appropriate tags to refer to the image and your link.

  • Can and how do you add a link to Facebook, Linkledin, etc

    Would like to add a links to various website, facebook, Linkedin, youtube, etc to my website.
    I see them on others sites with their Icons as the link. Can Iweb do that and if so how?

    Go here for Facebook or Twitter logo. Control click to download.
    Drag it onto your page and select it as a hyperlink to the appropriate page.
    For facebook like, comment and live stream, see this page...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Facebook-Button.html

  • How to attach a Callto Link to a swf-file?

    Hi,
    I'm currently working on an animated skype button (swf-file) which I included into my website and I'd like to attach the following command to it:
    Callto://myskypeid
    It would be perfect, if - when hovering on it - it shows that it contains an active link (showing the "hand") and when clicking on it, it calls the user's skype app. to phone me on skype
    So, in the adobe tutorials I found the following code for inserting a "hyperlink" to a button.
    import flash.events.MouseEvent;
    function gotoAdobeSite(event:MouseEvent):void
       var adobeURL:URLRequest = new URLRequest("http://www.adobe.com/");
       navigateToURL(adobeURL);
    linkButton.addEventListener(MouseEvent.CLICK, gotoAdobeSite);
    I customised the code:
    import flash.events.MouseEvent;
    function openskype(event:MouseEvent):void
       var Skype:URLRequest = new URLRequest("Callto://myskypeId");
       navigateToURL(Skype);
    linkButton.addEventListener(MouseEvent.CLICK, openskype);
    But the problem is that there occur "linkbutton not defined property or method" errors when running the code.
    My swf or rsp. my fla file contains 10 movieclips which run one after another on the timescale, all in different layouts so that the colour changes during the "run".
    I tried it with the first movieclip - layer1 - and named its instance "linkButton".
    Didnt work.
    Then I tried to insert another layer and attached another picture with alpha=0, converted it into a button and gave its Instance the name "LinkButton", but also didnt work.
    Can someone please help me here? I suppose its just a "small" mistake and I couldn't be "so far away" from succeeding...
    That would be great! Thanks for the help in advance!!

    Hi Ned and all the others,
    ok ...the problem isn't really fixed so far.
    But the first step is done! :-) with the following code:
    import flash.events.MouseEvent;
    function openskype(event:MouseEvent):void
       var Skype:URLRequest = new URLRequest("Callto://myskypeId");
       navigateToURL(Skype);
    linkButton.addEventListener(MouseEvent.CLICK, openskype);
    I replaced the "Callto://myskypeId" with "skype:myskypeId?call" as the first syntax shows a wrong Skypname resp. the name will be shown with a "/" in the end.
    But now i'm faced with the problem, that
    1st: there's no "hand" shown, when hovering the button on the website.
    2nd: I have to doubleclick on it to open the skype application.
    3rd: after i doubleclicked on the button there opens up always an additional blank page shown in the browser. And now I try to fix that - I tried it with navigateToURL(Skype, "_self"); or "_parent" and so on...but didnt work.
    Meanwhile I think the because of not all of the pictures - MCs - are attached to the instance of "linkButton" that there's the missing "hand" when hovering with the mouse the button. On testing i found out that some of the pics are still bitmaps although i converted them all in the beginning to MCs (??dont know what i did there...).
    Think the "missing hand" problem will be fixed more easily.
    The bigger problem is, how to avoid the additional blank page in the browser when clicking on the swf on the website?
    It seems to me, that on the one hand, I'd like to have an "active" link on that swf (or button) that shows the "hand" in the mousepointer - but on the other hand, it's not really a website which I'd like to open up then but just an application. So maybe here's the main problem.
    Alternatively I thought about replacing the sequence with the URL request in the code by something rather appropriate for lauching applications e.g. FS Command or something like that. (read that somewhere).
    If someone knows/had similar problems/could help me again - or at least to the next step that would be perfect!
    Thanks again, Ned for your helping advice (I learned something!!!) - maybe you could help me with the above probs?
    Best regards
    steff

  • How do I add playback control to a .swf file in Director 11.5 (PLEASE HELP!)

    Hi,
    I am currently trying to add controls (play/stop/etc) to a .swf file within Director 11.5. The movie imports fine and plays perfectly, however there does seems to be built in options to add the control in the same way you would for a .mov.
    The .swf file has been created with controls and plays outside of director fine. When it is placed into director the controls disappear and leave a white space.
    Is there a step by step guide somewhere or can someone give me a step by step guide? I'm fairly new to director and won't know some of the terms etc....
    The movie is 30 mins long and requires the user to move to various points and pause the playback. I cannot change the format of the file either.
    Please let me know if you need any more info...
    PLEASE HELP, I have to complete this in 2 days.
    W

    Probably too late for your project but...
    You can do this by using 3 sprites in addition to the SWF. In this example, I've named them "videoPlay", "videoRewind, and "videoStop". The SWF in this case was named "video."
    Apply this script to each of the 3 sprites.
    property mySprite
    on beginSprite me
      mySprite = sprite(me.spriteNum)
    end
    on mouseUp me
      case mySprite.name of 
        "videoPlay":
          sprite("video").play()
        "videoStop":
          sprite("video").stop()
        "videoRewind":
          sprite("video").stop()
          sprite("video").rewind()
      end case
    end

  • How do you add multiple links to a rollover image?

    Hi guys,
    I'm pretty much a novice when it come to DW, but i understand some things and can get by with a simple website(i only use design mode).
    Anyways, i understand how to use rollovers if its a basic image over image swap. My issue is, I have a link that says "T-shirts" and what i want is when you roll the mouse over that text, it swaps to another text -"1 or 2". Now on the "1 or 2" image, i want to have 2 seperate links on them.  I tried using hotspots but to no avail. Everytime, the "1 or2" text comes out as a single link. Is doing this possible? I'm using CS4 if that helps btw.
    Thanks!!

    I think you're trying to make something that is more complicated than it needs to be... First, as far as I know there is no easy way to accomplish what you're trying to do with a single image...
    The first option would be to split your initial image in half, and create a rollover effect on the left half on rollover with the specified link 1, and add a second rollover effect on the right side image so that it also changes. Do the same with the right half image - create the rollover effect along with the link for that image only, then add a rollover script that affects the left side image (I've attached a very basic sample to demonstrate in the zip folder - note that there are two rollover images - each with a separate web link, and each has a rollover effect that affects both buttons...)
    Second option is perhaps using a "Dropdown" menu that (on rollover) shows two more links... there are many ways this can be accomplished - the easiest (in my opinion) is by using the "spry menu bar". Once created, you can adjust the colors, fonts etc., and an image could be replaced on the initial link within the css... (my website is still under construction, but hopefully will show what I mean: http://www.jgigandet.com/) If you google "drop-down menu html, you'll find several other alternatives  to spry as well...
    Hope that helps...
    Jesse

  • How do you add portable links to the Custom Landing Page

    I have customized the PS2 Landing Page. This will be deployed to multiple environments. I need the url links on the page to be portable and point to a location on the server it is running on. (ex. anyHost.oracle.com/xyz where anyHost will be the server this is running on).
    I've tried using EL in the goLink : destination="http://#{facesContext.externalContext.request.serverName}/xyz"
    and also:
    goLink: destination="http://#{landingBean.host}.oracle.com/xyz"
    where the code is:
    package custom.webcenter.spaces;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.Cookie;
    import javax.servlet.http.HttpServletRequest;
    public class landingBean {
    public landingBean() {
    public String getHost() {
    FacesContext context = FacesContext.getCurrentInstance();
    HttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();
    String host = req.getServerName();
    if (host.equalsIgnoreCase("127.0.0.1")) {//If running this from the laptop, return abcde
    return "abcde";
    else { //split the hostname and return the first part
    return host.substring(0, 6);
    These did not work and caused the page to not display at all.
    Please let me know if you have any suggestions.
    Thank you!

    I tried this:
    <af:outputText value="http://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}/" />When i run this, it shows:
    http://localhost:7101/
    I believe this is whay you need.

  • How do you add a graph to a TDMS file

    Hello All,
    is it possible to add a graph or an image of my front panel graph to a TDMS log and if so, how would i do that?
    Thank you,

    As others have said TDMS is not the right file format for images.  It can be done but other options are probably better.  But that doesn't mean you can't start with TDMS and end with something like XLSX with images.  Here is a link for a tool I made that converts TDMS to XLSX, from there you can use ActiveX to import images and save them.  Or make real graphs like in Excel.  Or use the Report Generation Toolkit to edit the XLSX file after the conversion.
    https://decibel.ni.com/content/docs/DOC-36555

  • How do you add cue points to a MOV file that Director 12 can read?

    I have just downloaded the Trial of Director 12 - and unless I can add cue points to video that it can interpret - I am not going to be able to achieve what I need to.  I've spent the last day and a half looking over the scant documentation provided by Adobe, and anything else I could find online - but the only answers that came anywhere near were for old versions using discontinued xtras.
    Please can anyone help? - I am using Windows 7 64 bit - CS6.
    Thanks in advance. :-)

    Probably too late for your project but...
    You can do this by using 3 sprites in addition to the SWF. In this example, I've named them "videoPlay", "videoRewind, and "videoStop". The SWF in this case was named "video."
    Apply this script to each of the 3 sprites.
    property mySprite
    on beginSprite me
      mySprite = sprite(me.spriteNum)
    end
    on mouseUp me
      case mySprite.name of 
        "videoPlay":
          sprite("video").play()
        "videoStop":
          sprite("video").stop()
        "videoRewind":
          sprite("video").stop()
          sprite("video").rewind()
      end case
    end

  • How do you save a pdf as a SWF?

    How do you save a pdf as a SWF file?

    What sort of PDF?  I'm thinking that the sort that would benefit from being saved out to SWF would be better done in InDesign, but give more details about the file.

Maybe you are looking for