Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
madtiger #1
Menubar component problems
Greetings all,
I have been pounding away on the new MX2004 flash, and I have run into a
little snag. I am trying to use a menubar component in multiple .swf files, and
it loads and populates beautifully in the first file I open.
Problem is, when I use a menubar link to open another flash movie (.swf) using
"LoadMovie", the menubar items all read "Undefined". I have used SEVERAL
methods to build the menubar, including the one given in the help file. No
luck.
To make it even stranger, when I open flash player and drag a .swf into the
window, all of the menubar items are undefined EVEN IF THERE WAS NO OTHER MOVIE
LOADED INTO THE PLAYER. I have a little example of the code I have attached to
the menubar:
onClipEvent (load) {
var general = this.getMenuAt(0);
general.addMenuItem({label:"Overview", instanceName:"overView"});
general.addMenuItem({label:"How to Use this Tutorial",
instanceName:"howToUse"});
var listen = new Object();
listen.change = function(evt){
var general = evt.menu;
var item = evt.menuItem;
if (item == general.overView){
loadMovie("Overview.swf",0);
trace(item);
} else if (item == general.howToUse){
loadMovie("howToUse.swf",0);
trace(item);
}
}
}
Anybody got an idea of why this would happen?
madtiger Guest
-
Opening a component with menubar/menuitem
Hi I am a new user of Flex Builder. I am trying to develop a new software product. I wanted to know how one can open a component in stack when... -
Help with menuBar component
Hi, I am new to flash MX 2004 Pro, (was a flash user for 3 and 4) I am trying (unsuccessfully) to create a menu using the menuBar component. I... -
MX 2004 Pro - MenuBar Component
Greg, What do I have to do to add more items and link them. pls send an example.. tks a lot. -
menuBar component -- using it as toolbar
I've spent the last week trying to find out how to use the menubar component as just a simple toolbar. In other words, one completely without sub-... -
How to use getURL at component MenuBar?
How to use getURL at component MenuBar? -
madtiger #2
Re: Menubar component problems
oops- I forgot- I also have a listener component before the last bracket:
general.addEventListener("change",listen);
-MT
madtiger Guest



Reply With Quote

