PDA

View Full Version : Flash script trajectory


lengkyx
Apr 2, 2008, 08:05 PM
onClipEvent (enterFrame) {
this._x = this._x+getTimer()/1000;
this._y = (-10)*Math.sqrt(this._x)+500;
trace(this._x+"and"+this._y);
}

this script creates this curve:

7410


How can I invert the curve the object would follow? I'm trying to make a flower follow this curve:

7409

onClipEvent (enterFrame) {
this._x = this._x+getTimer()/1000;
this._y = (-10)*Math.sqrt(this._x)+500;
trace(this._x+"and"+this._y);
}

thanks.

cheeseycheese
Dec 15, 2008, 05:00 AM
try to change the similar line to this one, to this.

this._y = (10)*Math.sqrt(this._x)+500;