hi there folks.
this is the actionscript in the main timeline of my movie:
dropMenuOpen = false; // define initial status of dropdown
menuButton_mc.onRelease = function() {
trace("clicked");
if (dropMenuOpen == false) {
function myInterval() {
trace("interval executed");
}
setInterval(myInterval, 1000);
dropMenuOpen = true;
trace("drop menu opened");
} else {
dropMenuOpen = false;
trace("drop menu closed");
}
}
really basic. there’s a button on the main timeline (menuButton_mc) and when it’s clicked it uses an else/if to check if the (currently nonexistent) dropdown is open or closed. there are no problems here…
the problem is that if the condition is false, I want to execute some commands inside a setInterval(). this will not work for some reason! it seems to be an issue with the placement; if I place the setInterval() command outside the else/if, it executes fine. am I missing out on something fundamental here? helppp!
oh yeah, I’m using flash 8.