3 Replies Latest reply on Feb 18, 2014 12:12 PM by Ned Murphy
      • 1. Re: as2 game
        Ned Murphy Adobe Community Professional & MVP

        How do you intend to have the raotation done?  How does the rotation relate to the going to a frame, if at all... they do not necessarily affect each other based on anything you have described.


        To make something rotate you can continuously increment its _rotation property.


        If the intention is to stop at the frame for the rollover, then you probably want to use gotoAndStop rather than gotoAndPlay.

        • 2. Re: as2 game
          steviewood Level 1

          its to keep rotating but only stay on the same frame because all levels are done on one frame per level?

          • 3. Re: as2 game
            Ned Murphy Adobe Community Professional & MVP

            You should change the way you are coding so that you do not have code place "on" objects, but instead have it all in the timeline where it is easier to manage.


            Assign an instance name to the object that you want to have rotating.  Let's say you name it "rotatingMC"


            Then in the timeline use the following code to make it rotate constantly....


            rotatingMC.onEnterFrame = function(){

                   rotatingMC._rotation += 1;  // a higher value makes it go faster



            and to make a rollover for that same object you can use...


            rotatingMC.onRollover = function(){

                   gotoAndStop(???);  // assign something in place of ???