I’m having a problem with conflicting _global variables and was told that an array may solve my problem. I need to convert the code below to an array, but I’m a newbie when it comes to _global arrays.
How can I convert this?
//ROLLOVER
/////////////////////////////////////////////
on (rollOver) { this.button2 = true; }
on (rollOut) { this.button2 = false; }
//SETS BUTTON OVER STATES
/////////////////////////////////////////////
on(press) {
for (var i in _global) delete _global*;
_global.button2_on = true; }
// ROLLOVER FUNCTION (First Frame of MC)
/////////////////////////////////////////////////
this.onEnterFrame = function() {
if (button2) {
this.gotoAndStop(9);
_global.main_over = true;
} else {
this.prevFrame();
}
if (button2_on) {
this.gotoAndStop(9);
_global.main_on = true;
}
};
Here’s an example of the menu: www.earph.com/test.html