Flash Q: setInterval()
Flash Q: setInterval()
Out of context: Reply #1
- Started
- Last post
- 5 Responses
- unfittoprint0
u should put the if statement inside the moveball function:
moveBall = function () {
this.ball._x += 10;
if (this.ball._x >= Stage.width-this._width) {
clearInterval(ballMoverID);
trace("cleared");
}
}ballMoverID = setInterval(moveBall , 20);
trace(ballMoverID);