PDA

View Full Version : urgent :( Flash submenu



ASAAKI
Feb 13th, 2003, 11:38 PM
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?

MikoLone
Feb 14th, 2003, 05:38 PM
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

ASAAKI
Feb 15th, 2003, 12:45 PM
thanks that was my problem.

ps.


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

MikoLone
Feb 16th, 2003, 03:10 AM
Yeah, i missed the comma. I did it in a hurry and didn't have time to edit it. See ya!