Right Click Context Menu
Do you need to disable the right click menu when a flash movie is running? This post is for you!
//make a variable to hold a refernce to the right click menu
var myMenu:ContextMenu = new ContextMenu();//hide ALL the defaulty items flash has on it’s right click menu
myMenu.hideBuiltInItems();//make a new item on the right click menu and type in it’s name
var menuItem1:ContextMenuItem = new ContextMenuItem(“You don’t need to be right clicking. Get back to work!”);//add the item to the right click custom menu list
myMenu.customItems.push(menuItem1);//add the item to the right click menu now
this.contextMenu = myMenu;
You have now disabled flash’s default right click menu and made your own. You can even get more creative and put links to your website etc. in the right click menu.
About this entry
You’re currently reading “Right Click Context Menu,” an entry on Gena’s Blurb
- Published:
- March 16, 2009 / 12:42 pm
- Category:
- Actionscript 3.0, General, flash cs3
No comments yet
Jump to comment form | comments rss [?] | trackback uri [?]