|
// create interval object
intervalObj = new Object();
intCount = 0;
// create interval function
intervalObj.interval = function() {
/// if counter < 100 then a second has not yet passed so move the movieclip
if (intCount < 100){
intCount++;
tweenMC._x++;
} else {
// stop the interval function when time expires
clearInterval( intervalID );
}
}
// start interval with ID "intervalID" (i.e. execute above function every 10 milliseconds)
intervalID = setInterval( intervalObj, "interval", 10);
i solved it ^^^^ code above
|