A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [Help:F8]

  1. #1
    Member
    Join Date
    Aug 2007
    Posts
    34

    [Help:F8]

    Hi,

    rotate the object sideways with left & right arrow key in circle
    but while moving round the object should change its angle,
    i did this by changing the registration point of the object,But i don't want to change the
    registration point of the object and geting the same result.

    Please see the Attach file.

    Thanks.
    Attached Files Attached Files

  2. #2
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    To find the rotation of an object, given its x/y speed use this code:

    var rotation:Number = math.atan2(ySpeed,xSpeed) * 180/Math.PI
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

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