Posted By

codyo on 07/23/11


Tagged

menu click right customization Context


Versions (?)

right click customization


 / Published in: ActionScript 3
 

http://sierakowski.eu/list-of-tips/51-changing-the-right-click-menu-content-in-flash-with-contextmenu-object.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  

You need to login to post a comment.