0 Replies Latest reply on Jun 6, 2006 9:08 AM by Jak14713

    Need help on some actionscript

    Jak14713
      i have a few problems with the flash menubar. I am trying to make the movie goto a certain frame when a sub menu is click, But i dont know where to start. can anyone help?

      Jak - Cheers if you can help

      iv got what iv done so far: http://users.cjb.net/nowherefast/menu.swf

      If it will help iv got the code below:

      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);