A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Problem with getAngle script

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Posts
    15

    Problem with getAngle script

    Hi All,

    Could someone very kindly help with a script example of how to get the +- 0 to 45 degree angle (CW & CCW) of a mc and then use that value to control the angle of a second mc?

    Many thanks

    Groveman

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    Use rotation, for example
    trace(myClip.rotation);

    //Then you create a variable:
    var clipRot:Number = myClip.rotation;
    //Use an if statement to narrow the rotation to 0-45
    If(clipRot > 0 && clipRot <= 45)
    {
    //then apply the rotation
    myotherClip.rotation = clipRot;
    }
    - The right of the People to create Flash movies shall not be infringed. -

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