This content has been marked as final. Show 11 replies
are there mouse handlers attached to _root.menu_mc? if so, they are interecepting the mouse events and the child movieclips cannot respond.
i don't think so. Sorry for my ignorance, but the code you see is basically the only code I have in the movie.
menu_mc is located directly on the maintime line. Inside of menu_mc are the buttons. If I place a button instance inside of menu_mc (and there are not multiple instances of it) I can use an onRelease and it works fine.
I can create an invisible button, place it over the animated button and get the onRelease to work, however, since the buttons are rollovers, I loose the animation with the invisible button covering them up. I can't seem to target multiple instances of the same button in the movieclip. is there any way around this?
how's the dropdown work then?
and what do you mean by, "If I place a button instance inside of menu_mc (and there are not multiple instances of it) I can use an onRelease and it works fine."?
having more than one instance of an object would cause no problem. having more than one instance of an object with the same instance name would be a problem. is that the issue?
each button does have the same instance name, but it's the same button set at a different alpha.
your mouse handlers are defined for objects that don't exist (yet). it's not until main_mc plays beyond frame 9 of its timeline that your buttons exist.
to remedy you can attach your code to frame 28 of menu_mc's timeline. be sure to change your goto functions to goto methods of the _root timeline:
ok, i understand now that the mouse handlers don't exist until after frame 9 when the buttons are actually able to come up.
I did try attaching the code to 28 of the menu_mc timeline, but nothing happens.
Also, i don't see this as a solution even if it was working. I need to be able to change the actionscript dependent on where the user is in the timeline, and i can't overwrite it within one movieclip.
However, I think i found a way to do it through IF/ELSE statements placed on the individual buttons.
Thank you very much regardless!!! I really appreciate it!
wait, i screwed up. I got it to work.
if there's a way to use this method for changing the script dependent on where the user is, i'll use it. But it seems an if/else might be easier.
your basic approach is problematic. having code in different parts of your swf is undesirable as you already realize.
you generally want to place your code in a limited number of locations so it's easy to develop your project, debug it and extend it.
a better way to handle this issue is to insure that all objects exist on the first frame of menu_mc. they need not be visible (you can use the _visible property).
actually all the code will be located only on the five buttons within the menu_mc. it won't be scattered everywhere.
thanks for the input, but things seem to be working fine.