/ Published in: ActionScript 3

http://sierakowski.eu/list-of-tips/51-changing-the-right-click-menu-content-in-flash-with-contextmenu-object.html
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import flash.events.ContextMenuEvent; import flash.ui.ContextMenu; import flash.ui.ContextMenuItem; private var versionInfo:String = "SMS Poll App v1.i18n"; //right click menu customization //create my context menu object var myContextMenu:ContextMenu = new ContextMenu(); //create new custom items var about:ContextMenuItem = new ContextMenuItem(versionInfo); about.separatorBefore = true; //add new items to my context menu object myContextMenu.customItems.push(about); //associate my context menu to main clip this.contextMenu = myContextMenu;
Comments
