|Flash11 (CS5) Flash10 (CS4) <|
|Table of contents|
Created By Shelvin 
Create a Actionscript 3 File.
Then create a button, or use one from the presets library. Once the button has been created, give it a instance name. The instance name is what identifies the button and should be unique.
This code is to be added to the first frame on the main timeline.
// event handler
// trace action, shows what happens
trace (" "+evtObj.target.name+" link Clicked")
// goto link
gotoAndStop (evtObj.target.name); }
The event handler listens for mouse clicks. Instances should have the same name whats on the "labels" on the timeline so that the "evtObj.target.name" links correctly.
Currently the code shows 2 buttons. A home and cycling instance/label. To add more buttons, just change the instance name, thats all.