i have this script for setting a delay ...now, the first time i run the movie the delay works, now, if i call the script a 2nd time, the delay doesen't work anymore ...please look over my script and tell me if there's something wrong ...
code:
stop();
first = function () {
xPos = _root.mcMenu._xmouse;
yPos = _root.mcMenu._ymouse;
if (xPos<-475 or xPos>475 or yPos<-110 or yPos>48) {
_global.delay = 1;
myInterval = setInterval(delays, 2000);
delays = function () {
if (delay == 1) {
clearInterval(myInterval1);
_root.mcMenu.onEnterFrame = function() {
_root.mcMenu.prevFrame();
if (_root.mcMenu._currentframe == 2) {
delete _root.mcMenu.onEnterFrame;
}
};
}
clearInterval(myInterval);
};
} else {
_global.delay = 0;
}
};
myInterval1 = setInterval(first, 10);




Reply With Quote