Hello, I have some code that is supposed to detect if a movie subsection is currently “active” or “destroyed”, and respond to these conditions. When a subsection first loads it sets _root variable “state” to “active”. When a new menu item is rolled over, it triggers several events. It tells current movie to destroy itself. On the final frame of the movie subsections they change the _root variable “state” to “destroyed”. After the button tells the current movie to play destroy, it begins an on enter frame function that looks for state to be != to “active” (I’ve tried == “destroyed” here as well).
SO, my issue is, the trace inside the enter frame function works properly. It registers “destroyed” fine, but the rest of the code (the gotoAndPlay) fails to trigger!! Any idea what may be going wrong here?
menu.lilRed.onRollOver = function() {
trace(“red on”);
trace(_root.state);
trace(_root.currentMovie);
_root[currentMovie].gotoAndPlay(“destroy”);
_root.onEnterFrame = function() {
//trace(_root.state);
//trace(_root.currentMovie);
if (_root.state != “active”) {
trace(_root.state);
_root.bigRed.gotoAndPlay(2);
delete _root.onEnterFrame;
}
}
}