PDA

View Full Version : menu check up/down


bilbo
08-20-2001, 11:08 PM
I have a menu that checks whether one is open; if it is, close it and open the one clicked. But it is not working and I don't understand why. The code on the button is
on (release) {
script.move (logomenu)
}
//There are three menus referring to up
In the script it is:
function move (up) {
up; //this is the file
down = ""; //downstate
//0 is the up position
if (_root.logomenu.logoup._y == 0) { down = _root.logomenu;
}
if (_root.printmenu.printup._y == 0) {
down = _root.printmenu;
}
if (_root.webmenu.webup._y == 0) {
down = _root.webmenu;
}
if (down != up) {
if (down != "") {
down.gotoAndStop (3);
//F3 makes the file go down
}
if (up != "") {
up.gotoAndStop(2);
//F2 makes the file go up
//_root.content.loadMovie ("logo.swf");
}
}
}
Or here are all the files
ftp.engr.orst.edu
radomido
oxzpudvc

Go to menu1. Thanks to anybody for help.

matt poole
08-28-2001, 08:53 AM
I dont know about the code, but I've got around this problem
by adding an invisible button to the down frame of the menu MC with a hit area that follows the border of the menu. The invisible button has a 'rollOver' or 'rollOut' command on it that tells the menu MC to 'gotoAndStop' at the up frame of the MC. This way as long as youre over the menu buttons the menu stays open and as soon as you roll out of the menu it closes again. Also the all the menus will stay closed until you open one.

Not the most codey way of doing things but it works!