Changing the right click menu in flash files is relitivley simple. Using the code below and placing it on the root of your document you can add a new right click menu to your published files. This disables the existing zoom in, zoom out ect and enables you to attach functions to the buttons, whether it be launching a new web page or changing the colour of the movie clip document.
So heres what to do:
Paste the following code onto the root of your flash document, directly onto a blank frame, publish your movie, Job done!
And heres the code:
//define any functions to included on a menu item
function launchsite1(){
getURL("http://www.minimalistics.co.uk", _blank);
}
function launchsite2(){
getURL("http://www.minimalistics.co.uk/contact.php", _blank);
}
////Declare a new menu item
newmenu = new ContextMenu();//Hide the built in flash menu
newmenu.hideBuiltInItems();//define your new menu items
item1 = new ContextMenuItem("My Home Page", launchsite1);
item2 = new ContextMenuItem("Another Web Page", launchsite2);
newmenu.customItems.push(item1);
newmenu.customItems.push(item2);//Build New Menu
_root.menu = newmenu;
You can change add or remove any of the items above to suit your requirements.
Tags: blog, ContextMenuItem, Flash, flash menu, include, menu in flash, PHP, right click menu