actionscript physics stopper
actionscript physics stopper
Out of context: Reply #8
- Started
- Last post
- 12 Responses
- jwll0
It's best to use math.abs so that it won't matter if the target is more or less than the current point. So something like this onenterframe:
var dif= this.targetx - this._x
this._x += dif / 5
if(math.abs(dif)<0.6){
this._x = this.targetX
delete this.onenterframe
}