4 Replies Latest reply on Jun 11, 2006 4:11 AM by christian_cruz

    Detect a rotation angle

    christian_cruz
      Hello guys:

      I'm using a very simple script to rotate a Flash sprite around its center on a specific angle every time a click is perform on the stage, the code is this one:

      on mouseDown
      if (_mouse.clickOn = 0) then sprite(3).rotation = integer(sprite(3).rotation + -30) mod 360
      end

      The user everytime that clicks on the stage makes the sprite to rotate on -30 degrees, I would like to add some lines in order to make the projector to detect a specific angle, that is to say, when the rotation reaches a certain degree (the Flash member, starts the animation with rotated in 30 degrees, NO in its original 0 degrees position. ), so I would like to make the projector to detect the 0 degrees in order that something happens (go to a frame for example).

      Thanks in advance.