1 Reply Latest reply on Aug 15, 2008 9:17 AM by Joe ... Ward

    AS3 code for custom context menu dose not work on air

    Emad Zedan Level 1
      Hi

      I have this code written in frame 1:

      var MyMenu:ContextMenu=new ContextMenu();
      MyMenu.hideBuiltInItems();

      var Item1TXT:String="Emad Zedan © 2008";
      var Item1:ContextMenuItem=new ContextMenuItem(Item1TXT);
      MyMenu.customItems.push(Item1);

      Item1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,Item1Function);
      function Item1Function(e:ContextMenuEvent):void {
      T1.text="Emad Zedan © 2008";
      }

      this.contextMenu=MyMenu;

      but it dose not work???

      Please help me