0 Replies Latest reply on Jun 5, 2006 9:56 AM by Jak14713

    Actionscript Help!

    Jak14713
      I have created an application that has a menu bar on it.
      It uses this code to be created:

      stop();


      import mx.controls.Menu;
      import mx.controls.MenuBar;

      var my_mb:MenuBar;

      var my_menu:Menu = my_mb.addMenu("Menu");
      my_menu.addMenuItem({label:"File", instanceName:"File"});
      my_menu.addMenuItem({label:"Open", instanceName:"Open"});
      my_menu.addMenuItem({label:"Settings", instanceName:"Settings"});

      //Create listener object.
      var mbListenerbject = new Object();
      mbListener.change = function(evt_objbject) {
      var menuItem_objbject = evt_obj.menuItem;
      switch (menuItem_obj.attributes.instanceName) {
      case "About":
      trace("Open menu item");

      break;
      case "Services":
      trace("Open menu item");
      break;
      case "Settings":
      trace("Close menu item");
      break;
      }
      trace(menuItem_obj);
      };

      //Add listener.
      my_menu.addEventListener("change", mbListener);

      Does anybody know how to put actions to the sub menu buttons?

      Example - Click here

      Jak -Cheers if you can help!