1 Reply Latest reply on Jun 7, 2007 3:50 PM by kglad

    Class for Flash rotation math

    Level 7
      I am working on a project that has a lot of limit bound rotation going
      on. For instance, when a particular MovieClip - call it MC - is
      clicked, the initial rotation is recorded. Then a calculation is done
      to determine the possible max delta rotations that can occur (clockwise
      or counter-clockwise) during the move. An onEnterFrame event gets
      called and the MC is rotated and the _rotation is updated until one of
      the maxes has been reached.

      What I would really like is a way to make the flash _rotation act like
      the cartesian coordinate system, rotating counter-clockwise for positive
      and clockwise for negative rotation and starting with the zero reference
      angle on the x axis going left to right.

      If a translation method does not exist then a class that does
      computation for finding delta angles and directional relationships
      between angles would be very helpful.

      Anyone?
        • 1. Re: Class for Flash rotation math
          kglad Adobe Community Professional & MVP
          there's not much to do. _rotation in flash is the opposite of rotation of standard plane geometry. you could just pass the angle you want to rotate into a custom class or function and convert to the opposite angle.

          but if you do that, you may want to also convert y values and change the top of the stage to correspond to Stage.height and bottom of the stage to correspond to y = 0.