onClipEvent (enterFrame) {
this._x = this._x + Math.random()*100;
this._y = this._y + Math.random()*100;
}
What weve just done is very simple; weve taken the decimal number returned by Math.random and multiplied it by 100, so that now its greater than one and could be anything from 0 to 100.
This makes the random motion more timely, but now we run into another problem: the object dives off the stage pretty quickly, and doesnt come back. In the next step, well make some adjustments to the script that look complicated, but really arent.


