3 Replies Latest reply on Sep 22, 2011 1:38 PM by Ned Murphy

    Actionscript 2 help needed on rotating movieclip

    learner102

      I need help with the "stopping" of a movieclip rotation.  I think this would be easy for you Flash gurus but impossible for me.

      Here is the description.  The code below shows a movieclip rotating after mouse click but i want it to stop in place after 60 degrees.  Basically I need it to rotate 60 degrees after every mouse click and stop.  The "trace" function is there so i know something will happen when it rotates a certain degree.  Right now it rotates continually after the mouse click.

       

      mc.onRelease=function(){

           mc.onEnterFrame=function(){

                mc._rotation=mc._rotation+=10;

                if(mc._rotation==60){

                trace("HIT");

      }

      }

      }

      As a bonus i would like the rotation of every 60 degrees to ease in and out.  Thank you in advance for any help you can give me.