Subscribe to our newsletter:
The Actionscript
The actions in Frame 1 are as follows:
ActionScript Explained:
This creates a new object from the ContextMenu class.
This hides the standard items that are in the Flash context menu
Creates the text label that will be visible in the new Context menu and links this item to the function: mySpin
Places the new item created in the variable spin into the context menu
When you click on the Context menu item, anything listed in this function will be executed.
Associates all of the above with the movie clip called webwasp.
var myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
var spin = new ContextMenuItem("Spin Spin Spin!!!", mySpin);
myContextMenu.customItems.push(spin);
function mySpin() {
webwasp.gotoAndPlay(2);
}
webwasp.menu = myContextMenu;
ActionScript Explained:
var myContextMenu = new ContextMenu();This creates a new object from the ContextMenu class.
myContextMenu.hideBuiltInItems();This hides the standard items that are in the Flash context menu
var spin = new ContextMenuItem("Spin Spin Spin!!!", mySpin);Creates the text label that will be visible in the new Context menu and links this item to the function: mySpin
myContextMenu.customItems.push(spin);Places the new item created in the variable spin into the context menu
function mySpin() {
webwasp.gotoAndPlay(2); }When you click on the Context menu item, anything listed in this function will be executed.
webwasp.menu = myContextMenu;Associates all of the above with the movie clip called webwasp.





help
and feedback
latest
news
latest
forum entries