ActionScript3

Created By Shelvin [2007002975]

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

cycling.addEventListener(MouseEvent.CLICK, clickSection);

home.addEventListener(MouseEvent.CLICK, clickSection);

function clickSection(evtObj:MouseEvent){

// 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.