PDA

View Full Version : Simple delay/setInterval?



Inflicted
November 4th, 2003, 11:44 AM
I have 2 MC's on the stage: mc_1 & mc_2.
Both have following action:

onClipEvent (enterFrame) {
speed = 20;
this._y += speed;
if (this._y>=100) {
this._y = 100;
}
}
How can I create a simple delay between
the 2 mc's? setInterval?
Can anyone help me with this?

thanks,

regards

paisley
November 4th, 2003, 12:00 PM
I'm not sure with movies but with my buttons I use this...

button0.onRollOver = function() {
_root.expiration = getTimer() + 1000; //
button0.onEnterFrame = count;
}
button0.onRollOut = function() {
button0.onEnterFrame = null;
}

function count() {
if (getTimer() > _root.expiration) {
...your code when delay is fulfilled..
}
}