ASAAKI
02-14-2003, 12:38 AM
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?
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?