ActionScript 3.0 Code for Label Links

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

When the viewer clicks on buttons at the top, the respective frame with the relevant content should be displayed. Flash needs to be told which label to go to when a button is clicked.

  • In the buttons layer, click the keyframe in the timeline.
  • Open the action panel and type this code:

    ActionScript 3.0 code for Label Links

Below is an explanation of the customizable portions of the code above:

Label Link code

  • Make a copy of the 'Home' button code and change it to represent  the services button and the services label.
  • Repeat for About Us and Contact Us.

Button Code for Website Labels in Flash CS3

  • Test the movie.
  • Click the buttons. The relevant pages/ content for the respective buttons will be displayed.

Congratulations! Your website is ready. Publish it and upload the html, swf and js files to your hosting server to make your site live.

In order to make your website live you will need to sign up with a hosting server and domain name. I recommend Hostgator which I use to host this site.

Go to Flash Website Templates >>


Customizable Website Templates  
NOTE: You will need software like Adobe Dreamweaver, Photoshop and Flash to customize these templates.
more templates

Flash is part of Creative Suite 3 Web Standard
Streamline web design, development, and maintenance. Order Now!

Share