3 Replies Latest reply on Oct 10, 2007 5:48 AM by Sivakanesh

    Flip/rotate movieclip (rectangle)

    AspIsFun Level 1
      Hi there

      How can i flip/rotate a movieclip around it's own axis (a rectangle) with actionscript? I have been playing around with _width but i can't make it look good. :(

      Simular to this one: http://www.templatemonster.com/flash-templates/16467.html
        • 1. Re: Flip/rotate movieclip (rectangle)
          Sivakanesh
          The rectangle animation you see there are not made of flash objects. I.e. not flash symbols. They are small video clips, pre animated propably using a 3D package. If you zoom in to this animation you will see that all the lines get pixelated.
          You could achive similar results by using the Tween and Easing objects.
          • 2. Re: Flip/rotate movieclip (rectangle)
            AspIsFun Level 1
            You don't happen to have a little bit of sample code? :)
            • 3. Re: Flip/rotate movieclip (rectangle)
              Sivakanesh Level 1
              You can use the following code.

              import mx.transitions.Tween;
              import mx.transitions.easing.*;
              var twnRot= new Tween(yourMovieClipName, "_width", Regular.easeIn, yourMovieClipName._width, 0, 6, false);
              twnRot.onMotionFinished = function(){
              //the animation is finished so you can make the movieclip width from 0 to whatever.
              //also experiment with this.yoyo(); //it repeats the animatin.
              };

              the Tween arguments are (MCName, Property to animate, animation style, property start value, property end value, duration, Use seconds or frames)

              Instead of the Regular.easeIn you can use
              Regular.easeOut
              Elastic.easeOut
              Elastic.easeIn
              Bounce.easeOut
              Bounce.easeIn