5 Replies Latest reply on Jan 25, 2010 6:00 AM by tashmac

    add a url to a flash file

    tashmac

      Hi I want to add a

      url to my flash file so that when someone clicks on the file another page will

      open can someone tell me how to do this.

       

      Thanks

      Tash

        • 1. Re: add a url to a flash file
          Ned Murphy Adobe Community Professional & MVP

          What do you mean by someone clicking on the file? What version of Actionscript are you using?

          • 2. Re: add a url to a flash file
            tashmac Level 1

            Hi

             

            I am using flash 8 and what i mean is say its flashing text ans it says click here for more details so when some clicks there they will go to another page its a hyperlink.

            • 3. Re: add a url to a flash file
              Ned Murphy Adobe Community Professional & MVP

              If you are using Flash 8 then you are coding with Actionscript 2.  Make that flashing text either a movieclip or a button and give it an instance name via the Properties Panel.  Let's say you name it "clickBtn".  To make it go to another web page place the following code in the timeline in an actions layer in a frame where that button is.

               

              clickBtn.onRelease = function(){

                   getURL("http://www.yourdomain.com/yourpage.html");

              }

              • 4. Re: add a url to a flash file
                tashmac Level 1

                Hi

                 

                I did that but when i click on it nothing happens, can you have a look i have attached it

                 

                Thanks

                • 5. Re: add a url to a flash file
                  Ned Murphy Adobe Community Professional & MVP

                  A couple of problems.  1) You only have the button in the last frame, the other frames are still text.  2) Even for the frame that has the button, you did not assign it an instance name.  The instance name is not the library name... as I said, you assign it in the Properties panel.  Since you have different instances along the timeline that approach won't work anysways because each keyframe instance needs to have code assigned.  Here's a different plan...

                   

                  Change your last frame back to just being the textfield.  Create a new button symbol.  In the 4th (Hit) frame of that button draw a rectangle as big as the stage.  Go back to edit the document and insert a new layer between the two you have now.  Place that new button symbol in that layer and let it extend the length of the timeline.  Assign that button the instance name from before (specialoffer) in the Propertries Panel.

                   

                  Also, get rid of that empty keyframe at the end of your actions layer.