Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Movieclip playing only once

Status
Not open for further replies.

Fion

Vendor
Sep 25, 2003
50
0
0
US
Hi all,
I have an... intersting problem. Something tells me it is a really simple one.. I hope so :)

I have been build a full site in flash, and I am now working on the menu for the index page. I have dropdown menus that will (eventually) slide down and reveal new options each time a menu option is clicked. The problem it, it only works once for each button! When I hit the first menu option, it opens the sub-options (exactly like it should). I then press the second menu option, and it closes the sub-menu of the first, and opens the submenu of the second (again, exactly like it should) the problem occurs when I then press the first or second menu option a second time. Nothing happens. I have even put in a trace, just to see if the button-press script actually plays, and I get nothing.
Is there a way I need to reset the buttons when they close their respective sub-options? Below is the main actionscript of my movie.

openmenu = _root.nothing;

_root.About_mc.Aboutb_btn.onPress = function () {
openmenu.play();
openmenu = this._parent;
openmenu.gotoAndPlay("Over");
};

_root.Classes_mc.Classes_btn.onPress = function () {
openmenu.play();
openmenu = this._parent;
openmenu.gotoAndPlay("Over");
};


Thanks for your help!
 
Noone? Is this a totally new problem?
 
Where do you reset the open menu to nothing? I see you set it to this.parent for each menu item, but it seems like you would need to set it back to nothing when the menu is "dismissed".

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
I haven't set it to dismiss the menu, as the menu is always there. It closes the submenu in the openmenu.play() command. Then it opens the selected menu, and sets it as the openmenu.
The problem is that once a movieclip is played the button that played the movieclip no longer works.

Fion
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top