URL Link in Flash CS3 (ActionScript 3.0)

[This is Step 5 of the Flash CS3 (AS 3.0) Website Tutorial]

In ActionScript 2.0, we used to click on the button and give it onclick properties. In ActionScript 3.0 all the ActionScript is specified in the actions panel for the frame not for the button itself. We need to click the frame on the timeline and open the actions panel. We should NOT click the button instance and give the actions.

Creating a URL Link in Flash CS3 (ActionScript 3.0)

  • Click on the keyframe in the ‘logo’ layer.
  • In the actions panel type this code:

code to create a url link in actionscript 3.0 in Falsh CS3

Below is the explanation of the customizable portions of the code to create a URL link in Flash CS3:
code for url link in flash cs3 explained

  • Test the movie, you will see that the website opens when the logo is clicked.
  • Iin the code above, ‘Logo’ is the instance name of the logo button symbol. 'buttonClickHandler' is a function created by us to tell flash to go to the URL http://www.vineyardesigns.com.
  • MouseEvent.CLICK tells Flash to execute the function when the Logo is clicked.



Go to Step 6 >>

Flash is part of the Adobe Creative Suite
Streamline web design, development, and maintenance. Order Now!

God Loves You! "For God so loved the world that he gave his one and only Son (Lord Jesus Christ),
that whoever believes in him shall not perish but have eternal life." - John 3:16, Bible