From virtualMV2015wiki
Revision as of 17:01, 14 January 2015 by Hesperides (Talk | contribs) (1 revision imported)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 Home  Flash11 (CS5) Flash10 (CS4) <

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 (" "" link Clicked")

// goto link

gotoAndStop (; }

The event handler listens for mouse clicks. Instances should have the same name whats on the "labels" on the timeline so that the "" 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.

Icon References.png References

ActionScript3. (2018). In virtualMV's ( Michael Verhaart ) wiki. Retrieved October 21, 2018, from    (zotero)