7 Replies Latest reply on Mar 7, 2008 1:15 PM by clbeech

    Link to new webpage from SWF file

    BrantL
      Created a screen for our company intranet site utilizing an SWF file. When the movie completes its animation, I want users to be able to click on it and reach another website. The SWF plays fine but there is no link. I am new to this but eager to learn. Thanks for any help. Here's the latest ActionScript 2.0 code I tried:
        • 1. Re: Link to new webpage from SWF file
          robdillon Most Valuable Participant
          The code that you show is correct. What do you mean by "there is no link"? Are saying that the object that's clicked on does not open the new url?
          • 2. Re: Link to new webpage from SWF file
            BrantL Level 1
            Exactly. I am placing the SWF file into Dreamweaver as a piece of a bigger web page. When I place the cursor over the SWF in preview, it will change from a pointer to a hand for about one second but it does not open anything on a click. Thanks again for the info.
            • 3. Re: Link to new webpage from SWF file
              clbeech Level 3
              ahhh.... sounds like the 'button' doesn't extend over the whole duration of the timeline. Make sure that it is present throughout with out any 'keyframes' by extending the frames of the 'layer' it's on.
              • 4. Re: Link to new webpage from SWF file
                BrantL Level 1
                Let me apologize in advance for being such a beginner. clbeech, can you give me more info on extending the button on the timeline? I tried selecting the entire timeline but could not add actionscript to that. Also tried creating a second symbol (a button) in a seperate layer but it did not work. Is there an easy answer for applying my getURL script to my entire SWF file? Any help is appreciated.
                • 5. Re: Link to new webpage from SWF file
                  clbeech Level 3
                  np BrantL - everyone has to start at the beginning right? :)

                  I'm assuming that you have a 'button' on the timeline somewhere, that you'd attached to code above to, however the button must be present throughout the entire timeline, in order to be 'available' to click it. so it sounds like you were on the right track, but maybe just didn't quite go about it correctly, you're close.

                  select the button you currently have on the Stage, copy it, delete it. Then make a new layer, this layer should automatically extend over the entire duration of the timeline, select the first frame and 'paste in place'. Because you have attached the code TO the Object, it should 'travel' with the button, and know the button extends over the full timeline, and should be present and available to be clicked throughout the play of the file.
                  • 6. Re: Link to new webpage from SWF file
                    BrantL Level 1
                    Thanks clbeech! I got the link part working with the button. But now my SWF keeps looping, even after I turn off loop in every menu I can think of. Does it have something to do with the fact that I have just one keyframe for my movie clip layer? Can I somehow take out the loop even with just one keyframe? Thanks again!
                    • 7. Re: Link to new webpage from SWF file
                      clbeech Level 3
                      great BrantL - glad you got it working.

                      now swf files and movieclips loop by default, if you want to stop you need to add a stop(); action to the timeline. so create a new layer call it 'actions' and on the last frame of the timeline where you want it to stop (in your case the first frame) select the frame, open the actions panel, and type: stop();

                      that should do it ;)