My account
Shopping cart
Knowledge base
Support


Usage and Code Samples for Cross Menu Pro V1 Flash Component


Cross Menu Pro V1 Usage and Code Samples

//create a listener Object
listener = new Object();
//this is how the function "onRelease" will work when pushing buttons(menus)inside the component

listener.onRelease = function(arg) {
//tracing the id to the output panel
trace("id= "+arg);
//making decesion based on a switch condition
switch (arg) {

case "sm1" :
// outputing a string
trace("you pressed sm1");
// using the gotoAndPlay function
gotoAndPlay(23);
break;

case "s1" :
trace("you pressed s1");
// using the getURL method
getURL("www.jumpeye.com", "_blank");
break;

default :
// outputing that the clicked menu is not s1 or sm1
// this is the default action for the switch
trace("not s1 or sm1");
break;
}
};

//adding the listener object to the menu instance
menu.addListener(listener);