I've been using the MenuBar component a lot lately and wanted to share an example since I've seen a few questions popping up here and there about it. Most of this information can be found somewhere in the documentation, but I thought I'd put together a code example showing some of the various techniques of using the MenuBar component.
A lot of people learn better by code examples over reading... so here we go. Note that this example is really just the tip of the iceberg - there's a lot more you can do with this component not illustrated here. To explain everything would require a lengthy tutorial. Also, the MenuBar component is available in Flash MX 2004 Professional only.
The finished product will look this:
To get started, drag a MenuBar on the stage and name it "my_mb" and line it up at (0,0). Then drag a TextArea named "selected_ta" on the stage as well. Copy and paste the code below onto the time then export the movie to see everything work.
import mx.controls.Menu;
import mx.controls.MenuBar;
import mx.controls.TextArea;
// instances on the stage
var my_mb:MenuBar;
var selected_ta:TextArea;
// variables in this script
var file_menu:Menu;
// recent_menu (below) _should_ be of type Menu, but because
// menu.addMenuItem returns an Object, we have to declare
// submenus as type Object, and not type Menu or else the
// compiler will complain with an error.
var recent_menu:Object;
var edit_menu:Menu;
var view_menu:Menu;
var help_menu:Menu;
var view_xml:XML; // to illustrate creating a menu with xml
/*=================
FILE MENU
=================*/
file_menu = my_mb.addMenu("File");
// "new" is the linkage id of the movie clip to be used as the icon for the "New" menu item.
file_menu.addMenuItem({label:"New", instanceName:"newInstance", icon:"new"});
file_menu.addMenuItem({label:"Open", instanceName:"openInstance"});
// recent menu is a submenu
recent_menu = file_menu.addMenuItem({label:"Open Recent", instanceName:"recentInstance"});
recent_menu.addMenuItem({label: "Recent Doc 1", instanceName:"doc1Instance"});
recent_menu.addMenuItem({label: "Recent Doc 2", instanceName:"doc2Instance"});
file_menu.addMenuItem({label:"Exit", instanceName:"exitInstance"});
/*=================
EDIT MENU
=================*/
edit_menu = my_mb.addMenu("Edit");
edit_menu.addMenuItem({ label:"Item 1", type:"radio", selected:true, enabled:true, instanceName:"radioItem1", groupName:"group1" } );
edit_menu.addMenuItem({ label:"Item 2", type:"radio", selected:false, enabled:true, instanceName:"radioItem2", groupName:"group1" } );
edit_menu.addMenuItem({type:"separator"});
edit_menu.addMenuItem({ label:"Item 3", type:"radio", selected:false, enabled:true, instanceName:"radioItem3", groupName:"group2" } );
edit_menu.addMenuItem({ label:"Item 4", type:"radio", selected:true, enabled:true, instanceName:"radioItem4", groupName:"group2" } );
edit_menu.addMenuItem({type:"separator"});
edit_menu.addMenuItem({ label:"Item 5", type:"check", selected:false, enabled:true, instanceName:"checkItem1" } );
edit_menu.addMenuItem({ label:"Item 6", type:"check", selected:true, enabled:false, instanceName:"checkItem2" } );
/*=================
VIEW MENU
=================*/
// in this menu, the menu options are controlled by an xml data provider
view_xml = new XML();
view_xml.ignoreWhite = true;
view_xml.parseXML("<menuitem label=\"expand me\"><menuitem label=\"expanded1\" instanceName=\"expanded1Instance\" /><menuitem label=\"check me\" type=\"check\" instanceName=\"expanded2Instance\" /></menuitem><menuitem label=\"option 1\" instanceName=\"option1Instance\" /><menuitem label=\"option 2\" instanceName=\"option2Instance\" />");
view_menu = my_mb.addMenu("View", view_xml);
/*=================
HELP MENU
=================*/
help_menu = my_mb.addMenu("Help");
help_menu.addMenuItem({label:"About", instanceName:"helpInstance"});
// The listenered for the file menu (and submenus)
var fileListener:Object = new Object();
fileListener.change = function(eventObj : Object) : Void {
selected_ta.text = "Selected item: " + eventObj.menuItem;
// determine which menu item was selected,
// and call the correct action function - the functions
// are commented out (I didn't write them), and are just
// there to give you an idea of how to write an event
// handler
switch (eventObj.menuItem) {
case eventObj.menu.newInstance: /* new_Click(); */ break;
case eventObj.menu.openInstance: /* open_Click(); */ break;
case eventObj.menu.doc1Instance: /* openRecent_Click(1) */ ; break;
case eventObj.menu.doc2Instance: /* openRecent_Click(2) */; break;
// etc...
}
}
// A generic listener used for the edit, view
//and help menus (and their submenus)
change = function(eventObj : Object) : Void {
selected_ta.text = "Dumping eventObj... ";
for (var i in eventObj) {
selected_ta.text += newline + "eventObj[" + i + "] = " + eventObj[i];
}
}
// register the listeners with the separate menus
file_menu.addEventListener("change", fileListener);
edit_menu.addEventListener("change", this);
view_menu.addEventListener("change", this);
help_menu.addEventListener("change", this);
Enjoy!

59 Comments
Excelent! is the first tutorial i've seen about mx 2004 menu with multilevel-items...Thanks!
Posted by: David | November 14, 2003 8:53 AM
but, i was using a menu component that simply reads an XML file (hierarchical menu 1.4), and here i need to write a bunch of code to make MM menu work...do you have any implementation of make an xml file the dataprovider of all the menu?
Posted by: David | November 14, 2003 9:02 AM
Holle!
Posted by: mmm228 | November 15, 2003 1:37 AM
uuu
Posted by: Claudio Venegas B. | November 17, 2003 2:27 PM
Hey Darron, Great Job on the tutoria!
I know personally how difficult it is to get a grasp on these new components.
Here is a tip for those wanting to dynamically add/remove sub_menu's:
I had a difficult time trying to figure out why I couldn't add/remove sub_menu's on a menuBar and I finally figured it out.
The problem is that I was trying to use the "addMenuAt()" methods of the menuBar which only work on the root node (as far as I can tell).
I finally figured out that I actually needed to use the "MENU" component methods for subs, such as addMenuItemAt(), getMenuItemAt().
I was trying to add/remove items on the 1st child of the root node "openRecent".
Here is an example of how to dynamically add a sub menu to an existing loaded & parsed xml file.
Hopefully it will help some other poor soul out!
// example of already loaded xml
// example of AS to modify sub_ Menu of "File -> Open Recent"
testmenu = myMenuBar.getMenuAt(0); // root node so use the getMenuAt() method
trace(testmenu); //returns _level0.depthChild0 (returns undefined if not found)
testmenu = testmenu.getMenuItemAt(1); // Now use the MENU methods for subs: getMenuItemAt()
trace(testmenu); //returns undefined if not found
testmenu.removeMenuItemAt(0); // remove the sub_menu - if needed
trace(testmenu); //returns undefined if not found
testmenu.addMenuItemAt(0, {label:"Some New File",instanceName:"OpenRecentsubMenuItem_0"}); // now manually or dynamically add your subs
testmenu.addMenuItemAt(1, {label:"Another New File", instanceName:"OpenRecentsubMenuItem_1"});
trace(testmenu);
Note: if you want to add a sub menu to a sub menu, just do the following:
testmenu = testmenu.addMenuItemAt(0, {label:"Some New File", instanceName: "OpenRecentsubMenuItem_0"});
Thanks again Darron for taking the time to help out.
Hope this helps!
Posted by: Don | November 29, 2003 12:21 PM
Awesome! I was looking for something like this!
I have some questions though (I am an EXTREME newbie to flash...only having done a few things and this is only my second time messing with action script. I have done a lot of other different programming languages though, so I can understand most code anyways...I'll just apply it here where I can. Just asking for simple examples :) )
1) How do you change the color of the menuBar so its not green on the drop downs? Lets say I want to make it red, how would you do that?
2) Is it possible to make a MenuItem right on the MenuBar? Like lets say I wanted to click the Edit button on the example here and instead of dropping down a menu, it would send text to the textbox instead. Is that possible? I would really appreciate the help, thanks!
Posted by: OmegaZero | December 4, 2003 10:23 AM
One other thing, when the menu's drop down, you have to make the scene fit the drop downs (or so I have seen). The problem with this is that if I want to put HTML right under the menubar, I can't do it, I have to allow for the space for the movie. Is there a way to make the movie transparent or smaller so that I can put HTML right underneath it, yet the menu's still work? I am using a menubar that is 20 pixels high.
Let me know if I need to explain it better. Thanks!
Posted by: OmegaZero | December 5, 2003 9:00 AM
Very good tutorial indeed. This is what we need more. thanks a lot.
Posted by: mark | February 5, 2004 9:14 AM
this is great tutorial! Very comprehensive. I have on question, which I cannot find the answer. In your example when you hit the View>Expand Me menu, the child menu goes of the screen/falsh stage. the second time it doesn't. almost like it realised it went off the stage and repositioned it self. I does see that in your code. But I am experiencing the same thing, yet mine doesn't automatically reposition itself. Any ideas? I'm seriously stumped!
Posted by: Jeremy | February 10, 2004 4:24 PM
Thanks for this superb example. It's save me several hours reading. Well done!
Posted by: Mike | February 14, 2004 3:53 PM
This is great but is there anyway to make the word "File" on the menu bar to go to a url when clicked?
Thanks.
Posted by: Susan | February 23, 2004 4:05 PM
Can anyone tell me where the source code is?
thanks
Posted by: ARR | February 24, 2004 12:02 PM
Never mind...the source code doesn't appear on my mac. worked great on my PC though! thanks!
Posted by: ARR | February 24, 2004 3:39 PM
Hola>
Estoy comensando con falsh 2004 y quiero hacer un menu identico a este pero realmente no entendi el ejemplo quisiera que si hay posibilidad publicaran el archivo .fla .
Gracias de ante mano.
Posted by: LLO | March 19, 2004 3:30 AM
I am sorry guys, but i didn't understand
anyway, I am using Flash MX 2004 Professional
I want to make MenuBar with labels, and each label have a list of labels
and each label links you to a link
I am realy sorry for my bad information in flash and my bad langauge in English because I am from the arabs world, from iraq :)
I hope that you can help me
But in your lesson, there are two things I did not understod,
first, you are saying
(line it up at (0,0). )
what do you mean!!
second, you said
(Copy and paste the code below onto the time )
what is the time
do you mean in the actions of the fram
thanks alot
Posted by: Faisal Nabil | April 2, 2004 12:44 PM
Line it up at (0,0) means to place the menu at x location 0 and y location 0. With code, this can be done by saying my_mb._x = 0; my_mb._y = 0; as frame actions, but it's easier to just use the Property Inspector in the Flash IDE to set the x and y locations. The x and y locations are right near the width and height values, where you give your movie clip an instance name.
You are correct for the second part - copy and paste the code I provided on the timeline (as frame actions).
Posted by: darron | April 2, 2004 12:52 PM
awsome!!! thnaks a lot.
just have to say this is a wicked tut.
a dynamic version of this tut will be great.
Good work, nicelly commented. ;)
Thnkz a million again.
Posted by: jon | April 6, 2004 8:44 AM
Wow, just want I needed. thank you very much, macromedia did not help that much, and other tutorials. very nice and complete.
Posted by: Josh | April 8, 2004 4:47 PM
hi i was wondering if any body could help me if they know how to add like new menus to a menu pls pls email me if ya can help in menus thnx tesh1998@hotmail.com
Posted by: tesh | April 8, 2004 8:16 PM
I have managed to get the menubar to work, but is there any way to link a particular button in a menu to a URL? When I try, clicking anything in the menu goes to the same URL - not really much use...
Posted by: bob | April 15, 2004 11:03 AM
never, mind, sorted - everything works fine now, great tutorial.
Posted by: bob | April 15, 2004 4:41 PM
Try the menubar under simulated download. The system reports at about 98% of load that system may become unresponsive. The menu never appears. I have been getting strange results from my own menu bars under simulated download...menu items and label appearing as "undefined". Or, the menus being hidden under lower layers. Under workstation usage no problems where load is almost instantaneous. But, real problems under lower bandwidth loads. Any ideas? -Dale
Posted by: Dale Musser | April 17, 2004 6:24 PM
Here is a flex doc that gives some of the event handlers for the menuBar component: http://www.macromedia.com/support/documentation/en/flex/1/asdocs/mx/controls/MenuBar.html
You can use the menuShow event to capture a click on the menu item (instead of having to have a sub menu and clicking on that).
Example:
//the menu bar has an instance name of myMenuBar
var link_menu = myMenuBar.addMenu("Go to Dirq.com");
var linkListener = new Object();
linkListener.menuShow = function(evt){
trace("linked");
getURL("http://www.dirq.com", "_blank");
};
link_menu.addEventListener("menuShow",linkListener);
// -- EOF --
There is also a menuHide, rollOver and rollOut although I haven't tested them... (remember the doc is for flex). Hopefully this helps some people out.
-Dirk-
Posted by: Dirk Watkins | April 21, 2004 11:14 AM
-------------------------------------------------
//the menu bar has an instance name of myMenuBar
var link_menu = myMenuBar.addMenu("Go to Dirq.com");
var linkListener = new Object();
linkListener.menuShow = function(evt){
trace("linked");
getURL("http://www.dirq.com", "_blank");
};
link_menu.addEventListener("menuShow",linkListener);
// -- EOF --
-------------------------------------------------
this does work good, but if you click, and go to the other webpage and then back, you stil heve the link selected.
Posted by: bart | April 28, 2004 12:31 PM
I really have two questions/observations:
1) I am populating the menus in a menubar using the menubar's dataProvider, which I set to firstChild of a loaded XML object (from disk). Similar to the online help in Flash, except that in order to create a valid XML file one may only have a single node, while the dataProvider expects a node for each menu. The problem I have now is that I can not easily associate a handler with a menu instance since I do not have an instance of the menu in my actionscript. I tried the instanceName="firstMenu", but I did not end up as a menu instance that I could use later. Any idea what I am missing here. My work around (since I only have menu items that are supposed to load a new swf file) is to loop through all menus and associate the one handler with them:
myMenuBarDP.onLoad = function(success){
if(success){
var mn:Number = 0;
var mnu:Menu;
myMenuBar.dataProvider = myMenuBarDP.firstChild;
// now attach the change handlers to each of the menus
while ((mnu = myMenuBar.getMenuAt(mn++)) != undefined) {
mnu.addEventListener("change",mnu_listener);
}
} else {
trace("error loading XML file");
}
}
This becomes trickier if one needs different handlers for different menus and the order of the menus is not pre-defined. The only solution I see would be to then parse the XML file yourself too, which is starting to defeat the purpose to have a dataProvider for the menuBar to begin with. Any suggestions?
2) I am using submenus which can get pretty long and I noticed that Flash does not scroll the menu so that the items that fall below the window become visible once you try to go there. Do you know whether that is a functionality that I can 'turn on' or would that require diving really deep in the menu component's action script?
Thanks,
René
Posted by: Rene Kanters | May 6, 2004 9:57 AM
It's simple to externalize the xml data source to build a menu item, eg :
1. actionScript
/*=================
VIEW MENU
=================*/
// in this menu, the menu options are controlled by an xml data provider
view_xml = new XML();
view_xml.ignoreWhite = true;
view_xml.onLoad = function() {
view_menu = menuBar.addMenu("View", this);
}
view_xml.load("menuBar.xml");
2. xml file menuBar.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<menuitem label="expand me">
<menuitem label="expanded1" instanceName="expanded1Instance" />
<menuitem label="check me" type="check" instanceName="expanded2Instance" />
</menuitem>
<menuitem label="option 1" instanceName="option1Instance" />
<menuitem label="option 2" instanceName="option2Instance" />
P.S : Yes I know XML file is not well formed, but it's flash...
Posted by: Anonymous | June 2, 2004 4:16 AM
This example is a very good for me!
I have included Menubar code based on your code.
Thank you so much from Japan.
regards. Kaz Aonuma
Posted by: Kaz Aonuma | June 13, 2004 11:22 AM
this is a good example but how can I change the green color?
Posted by: Carlos | June 20, 2004 9:34 AM
This is how I set up the menu to allow for custom clickhandlers for menu topics.
1. XML documnet (menu.xml)
<?xml version="1.0" encoding="ISO-8859-1" ?>
<menuitem label="File" instanceName="file_btn">
<menuitem label="Login" instanceName="login_btn" clickHandler="login"/>
<menuitem label="Logout" instanceName="logout_btn" enabled="false" clickHandler="logout" />
<menuitem label="Update Account Info" instanceName="update_btn" enabled="true" clickHandler="updateAccount" />
</menuitem>
2. Actionscript
function setupMenu() {
//load in XML menu
view_xml = new XML();
view_xml.ignoreWhite = true;
view_xml.onLoad = function() {
myMenuBar.dataProvider = view_xml;
var mn = 0;
while ((mnu = _root.myMenuBar.getMenuAt(mn++)) != undefined) {
trace(mnu)
mnu.addEventListener("change",linkListener);
}
}
view_xml.load("menu.xml");
//set up menu event
linkListener = new Object();
linkListener.change = function(evt){
var funcName = evt.menuItem.attributes['clickHandler'];
_root[funcName]();
};
}
This way is really simple because the clickhandlers are set up in the XML document and allow for changes without re-publishing the movie.
Worked for me, maybe it will work for you.
Posted by: Scott Morgan | July 6, 2004 3:30 PM
nice :)
Posted by: Derrick | July 7, 2004 10:56 AM
Hi again,
I have done a thing similar to yours but I can't seem to understand how to use the checkboxes. How do you check if it is checked or not?
e.g. say I had a Menu bar called "menu" with a "File" menu and a checkbox with the instance name "check_one". I wanted to trace a line of text to the output box when it is checked and trace another line of text when it is not checked. How would I do this?
Cheers in advanced.
I've asked loads of people, news groups the same question but have never got an answer.
Posted by: Ollie T | July 28, 2004 6:20 AM
I am using the menuBar and menu components to grab data via remoting with a cfc. I have a bunch of results coming back with associated categories that builds the maximum of 3 tiers. Does this component have scrolling capabilities? If so, how do I set them? Class file? I'm also wondering if the "flyouts" are able to populate up or down based on the stage height (similar to IE favorites).
Posted by: james | August 16, 2004 10:42 AM
how would I make the parent menu item do a GetURL call. Not all parent menu items need a sub-menu item.
Thanks,
Andrea
Posted by: Andrea Mendolia | September 2, 2004 9:12 PM
this menubar component alone generates a file that's 62k when i test it.
how the heck are we supposed to manage dev'ing stuff with mx2k4 components when they bloat an swf like this???
Posted by: boze | September 28, 2004 12:58 PM
is it possible to reverse the "deployment" of the menu ?
for exemple : if i put the menubar at the bottom of my page ?
thanks
Posted by: :: DRAAK :: | September 30, 2004 11:28 AM
I am trying to use the menu bar tutorial and am quite the newbie to Flash...can you please help me to understand here....how do you get the menu buttons go to a URL when selected, I notice a few others are wondering the same thing.
Thanks in advance for any help.
Posted by: Steve | October 8, 2004 4:47 PM
Hello. Wonderfull example. Thanks. But I have one question: Where is defined the icon for the menu item File/New? ...in the library? Is it possible to download icon from http-server? Thank you in advance.
Posted by: Yuri | October 19, 2004 12:31 AM
Daron,
Words can't expess how much I apreciate your tutorial. This tutorial is really excellent.
However, I encountered the following errors,
while I was compiling your code, my_mb, and
selected_ta. Maybe you can help me out.
2) Do you happen to know a solution to the following problem:
If I put this menu bar on the top frame, html,
of the website, can I let the flash menu drop down
into the lower frame? Or do I really have to make a lot of empty space for the menu items to drop down?
=============== ERROR MSG ===================
**Error** Scene=Scene 1, layer=layer, frame=1:Line 9: The class 'Menu' could not be loaded.
var file_menu:Menu;
**Error** Scene=Scene 1, layer=layer, frame=1:Line 15: The class 'Menu' could not be loaded.
var edit_menu:Menu;
**Error** Scene=Scene 1, layer=layer, frame=1:Line 16: The class 'Menu' could not be loaded.
var view_menu:Menu;
**Error** Scene=Scene 1, layer=layer, frame=1:Line 17: The class 'Menu' could not be loaded.
var help_menu:Menu;
Total ActionScript Errors: 4 Reported Errors: 4
Posted by: shakesbeer from Canyon, TX | November 10, 2004 11:01 AM
@shakesbeer -
Make sure you import the Menu class so the compiler knows where to look for it. Add the following line of code to the top of your script:
import mx.controls.Menu;
You might've just missed it when copying and pasting.
Posted by: darron | November 10, 2004 11:52 AM
I need the parent menu item and NOT the sub menu items to broadcast a change event when clicked..The menuShow event works except it keeps working and not just when clicked, seems it fires on opening. I appreciate any help...
Posted by: Brian | November 19, 2004 1:53 PM
Hello,
when i try sample in flash mx ide, and debug it. The sample work.
when i copy the swf in the web site and try it. the sample don't work. The sub items are hide ...
I'm a MS Vc++ Developer ... Macromedia like Microsoft .. (?) ;)
Posted by: nicola fagan | January 26, 2005 9:15 AM
Brilliant stuff! Very thorough and straightforward code.
Posted by: Matt | March 30, 2005 5:18 AM
I noticed some of you want to place the menu bar at the top of the page, so that the submenus would 'float' over the content of the page, without pushing everything down and creating a huge gap. This is possible using CSS (Cascading Style Sheets) and 'positioning.' Make sure that the EMBED code has the same parameters that I used i.e. that 'wmode' is set to transparent.
Here's the code:
Any content you like.
Posted by: Anonymous | March 30, 2005 11:37 AM
Ok... the code hasn't appeared. Please email me if you still want it.
Posted by: Matt | March 30, 2005 11:39 AM
in single frame can i load two xml file it is possible? i am using flash mmx 2004 version
Posted by: illango | May 5, 2005 1:17 AM
in single frame can i load two xml file it is possible? i am using flash mx 2004 version
Posted by: illango | May 5, 2005 1:17 AM
Great code! what i am searching is how to do the horizontal sub menu as on http://www.macromedia.com, where the top menu changes an horizontal sub menu
Any idea?
Posted by: Francois | May 15, 2005 12:34 PM
Does anyone know how to make the menu items open a webpage???
Posted by: bill | May 18, 2005 7:47 PM
This tutorial rocks. I have a question though. How do I make the menu so that when you rollover, it doesn't show the submenu. I want to click on each item to show instead of showing it when you rollover. I know it has to do with menu.showMenu or change, or click. Tried changing of all this in the code but didn't work. Help...
Posted by: bryan | July 14, 2005 3:46 PM
Hello
I have come across this statement further up.
Try the menubar under simulated download. The system reports at about 98% of load that system may become unresponsive. The menu never appears. I have been getting strange results from my own menu bars under simulated download...menu items and label appearing as "undefined". Or, the menus being hidden under lower layers. Under workstation usage no problems where load is almost instantaneous. But, real problems under lower bandwidth loads. Any ideas? -Dale
Posted by: Dale Musser at April 17, 2004 06:24 PM
Is there any solution to this problem, as I am experiencing the same?
At present I am trying to re-write our website (having not written it myself) and upgrade to new flash components.
Jim Ashby
www.flowersbyrosa.co.uk
rosa.ashby@orange.net
Posted by: Jim Ashby | August 24, 2005 8:43 AM
This tutorial was very informative, as were all the comments. I would like to know if anyone has the code, or an explanation for having a menu flash file in a frame of an html file, where the submenus will float over other html content. Also, how do you go about adding links to other pages in the menu items of the menu component?
Thanks,
Z
Posted by: Zuzanna Miernik | August 25, 2005 4:20 PM
hi
i want to know it is possibale to add shortcuts keys to menu
Posted by: mushtaq | September 24, 2005 2:24 AM
I need to set a URL to your menu item.
as a Example: when I click "New" on the File menu I need to go "www.google.com" and when I click "About" on the Help menu I need to go "www.yahoo.com".
How can I do this? Please help me.
Posted by: Y.S. Manjula | September 27, 2005 6:19 AM
This is the best tutorial. Why can Macromedia with all the money and staff they have put something like this out instead of half ass tutorial that few people can follow. I am always amazed at how many people are having trouble with flash and actionscript. The tutorials in macromedia are so basic it’s a waste of time. Or the guru’s are so advanced that they do not know how to explain anything in simple language.
Thank you for sharing with us beginners. Thank you. Thank you
Posted by: william | October 9, 2005 3:39 AM
Thanks for this tut! I agree with the statement above that Macromedia should have better docs and tutorials on their stuff. This is a complex component so how is anyone supposed to "figure out" what it is capable of??
I used bits and pieces of this tutorial to get my menu bar working. All of my code is in a seperate .as file and if anyone would like to see how I got it working, send me an email and I'll send the script file. There are TONS of comments cause I'd lose my ass if there weren't!
Thanks for the great tutorial!
Posted by: Ron | November 12, 2005 2:03 PM
has anyone noticed after placing menu on stage with the code form example ( or any code it seems ) any mc.onPress function is nullified? for example have a menubar, i click a menu like file and then select open etc. then after that i goto some mc that has an onPress and it traces "bleh" when pressed but, only once. after that, when pressed, no bleh. and i press and press and nothing. until, i move my mouse a bit, then it will work again, but only one time until i move my mouse. what gives, anyone?
Posted by: adam | November 14, 2005 11:05 AM
i am adding 20 components on the menubar but it shows only 10 components but if i give width="1000"
it will show all component.I need all component without giving width.
Posted by: Mahendran | November 16, 2005 6:39 AM
-Thanks, ..but do You can say, how to redraw menubar and other components in FLASH MX Pro? Is it possible?
Posted by: Ezis | November 29, 2005 2:40 PM
No te imaginas como necesito esta rutina, ya que estoy haciendo un trabajo de estadistica.
Una pregunta, no podes enviarme el archivo de ejemplo?
Muchas gracias
Posted by: Eduardo | March 13, 2006 11:11 AM