Helpful Information
 
 
Category: Flash & ActionScript
urgent :( Flash submenu

i've got a problematic submenu here (at least, it's problematic for stupid ol me).
I've got a menu in flash, and clicking on one link "menu items" is supposed to bring up a submenu. What I did was make the submenu a movie clip ("submenu"). Through the Library I chose the Export with ActionScript option for it. Then, for the link on the main menu ("menu items"), I put this for Actions:

on (release) {
_root.attachMovie(submenu,submenu,100);
_root.submenu._x = 11.3;
_root.submenu._y = 180;
_root.submenu.gotoAndPlay("startMovie");
}

Didn't work. So I tried putting the movie clip in a separate layer that stays there throughout the timeline. Then, on the first frame of the whole movie, I put an action:

_root.submenu._visible = false;

and on "menu items":

on (release){
_root.submenu._visible = true;
}

No good. (well, i knew it was a lame try...) What happened instead was that the submenu was just visible all the time.

So then I tried playing around with _alpha.

But no matter what I do it doesn't work.

I figured one definite way out would be to just make a duplicate of the current frame, but with the submenu turned visible. But I'd rather not do that and do it using ActionScript instead, coz I've got a trillion different frames.

What's the most normal approach used for submenus, and what am I doing wrong in my code?

did you set the movie export properties on the movie clip? If you do not know what that is then right click the movie in the library and choose "inkage..." Then type a name into the box. Then, your attach statement should look like this.



_root.attachMovie("submenu linkage name", "submenu new name" level);


so you're missing quotes and thats it if your export linkage name is submenu.

Good luck

thanks that was my problem.

ps.


_root.attachMovie("submenu linkage name", "submenu new name" , level);;)

Yeah, i missed the comma. I did it in a hurry and didn't have time to edit it. See ya!










privacy (GDPR)