Ok im pretty new to actionscript but im catching on fairly quickly (using AS2). Im good with javascript and apparently im too used to javascript and php because variables dont seem to work the way they are supposed to in AS. I have 3 buttons and they pop a menu below them (coming in from left or right depending on the last button that was moused over).
i simply have an if statement inside of an on(rollOver) to see which button was last highlighted and executing an exported movie clip from there.
on(rollOver){
if(which > 1){
insert.attachMovie("menuRight", "menuRight", 200);
insert2.attachMovie("empty","", 200);
insert3.attachMovie("empty","",200);
}
else {
insert.attachMovie("menuCenter", "menuCenter", 200);
insert2.attachMovie("empty","", 200);
insert3.attachMovie("empty","",200);
}
which = 1;
}
and have that for 3 buttons of course changing depending on the button. Well it doesnt work in any way. it almost seems like its not checking the value of "which" at any time, it doesnt even execute the else statement. BTW, i have var which = 0; on the first frame. Any help in understanding how AS reads, updates, and executes variables would be very helpful :)