1 Reply Latest reply on Dec 19, 2006 12:35 PM by .:}x-=V!P=-x{:.

    Using code, I'd like to animate a movieclip so that it sways back and forth

    dtrace
      I'd like a piece of text to basically move around slightly....like it's floating. Just a slight back and forth, maybe a little up and down. Real subtle though.

      how would i do this with code. Can you please help me.

      Thanks
        • 1. Re: Using code, I'd like to animate a movieclip so that it sways back and forth
          .:}x-=V!P=-x{:. Level 3
          make a movieclip then give it a instance name then create a minFloat (x,y) and maxFloat (x,y) variables to hold the minumum and maximun float from origional position then create a looping function that will contain a randomFloat variable to generate a random number and check to make sure it will not move past the max float (x,y) or regenerate another random number then once it finds a number tell it to move. I would create a move function to ease in and out the movement to add your subtleness and have the looping function fire the move function once it gets a correct randomFloat.