Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Scripting (https://www.askmehelpdesk.com/forumdisplay.php?f=455)
-   -   Flash script trajectory (https://www.askmehelpdesk.com/showthread.php?t=201763)

  • Apr 2, 2008, 08:05 PM
    lengkyx
    2 Attachment(s)
    flash script trajectory
    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:

    Attachment 7410


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

    Attachment 7409

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

    thanks.
  • Dec 15, 2008, 05:00 AM
    cheeseycheese

    try to change the similar line to this one, to this.

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

  • All times are GMT -7. The time now is 09:19 PM.