A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Random move...orient to path?

Threaded View

  1. #4
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    A couple things:

    1) I forgot to mention that with this code, your 'normal' movieclip (with rotation at zero) should be pointing to the right.

    If by 'not working' you mean that your movieclip was pointing 90 degrees to the left of where it should be, then that was the problem.

    If you can't fix the movieclip to point to the right, you can add a constant to the rotation to compensate for this:

    this._rotation = ar*180/Math.PI + 90;

    If by 'not working' you mean something else (such as an error message), please be clear about how it's not working, do I can help you fix it.


    2) There was a syntax error in my code which I have since fixed (an extra paren).

    Finally, I'm guessing you want your movieclip to turn smoothly instead of flipping around quickly, as it is now.

    This is a bit more complicated and I'll post it shortly.
    Last edited by jbum; 10-15-2004 at 07:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center