I’m trying to create a dot that moves with easing towards a randomized point. The randomization works. But the dot isn’t moving with easing it just “hops” from the one point to the other.
I used this script but I believe it has a mistake hidden in it.
[AS]onClipEvent (load) {
speed = 5;
}
onClipEvent (enterFrame) {
this._x = _x+(endX-_x)/speed;
this._y = _y+(endY-_y)/speed;
if (endX=this._x) {
if (endY=this._y) {
endX = Math.floor(Math.random()(550-0)+0);
endY = Math.floor(Math.random()(400-0)+0);
}
}
}
[/AS]
Could someone help me?
Thnx in advance