2 Replies Latest reply on Sep 19, 2006 2:17 PM by dishmael

    Custom MenuBar

    dishmael Level 1
      I'm trying to create a custom MenuBar using pure ActionScrit but can't seem to get this working. What I'd like to have is a MenuBar that allows me to enable/disable items programmatically. Here's what I've got:

      <mx:MenuBar ... >

      <mx:Script>

      private function init():void {

      var menuItem:MenuBarItem = new MenuBarItem();

      menuItem.name = "Item 1";

      this.addChild( menuItem );

      }

      </mx:Script>

      </mx:MenuBar>

      But I get errors about MenuBarItem not being initialized (or something). Anyone got some sample code?