right click customization


/ Published in: ActionScript 3
Save to your folder(s)

http://sierakowski.eu/list-of-tips/51-changing-the-right-click-menu-content-in-flash-with-contextmenu-object.html


Copy this code and paste it in your HTML
  1. import flash.events.ContextMenuEvent;
  2. import flash.ui.ContextMenu;
  3. import flash.ui.ContextMenuItem;
  4.  
  5. private var versionInfo:String = "SMS Poll App v1.i18n";
  6.  
  7. //right click menu customization
  8. //create my context menu object
  9. var myContextMenu:ContextMenu = new ContextMenu();
  10. //create new custom items
  11. var about:ContextMenuItem = new ContextMenuItem(versionInfo);
  12. about.separatorBefore = true;
  13. //add new items to my context menu object
  14. myContextMenu.customItems.push(about);
  15. //associate my context menu to main clip
  16. this.contextMenu = myContextMenu;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.