complete rotation before stopping

  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

i have an animation of a 3d cube rotating continuously. i would like to know how or what script to write the following condition.

cube should rotate until stop button is pressed.
once stop button is pressed then the cube should make a complete 360 degree rotation then stop. (the last frame of the 3d cube movie clip shows the cube facing you full on, so basically the movie clip should play until it reaches the last frame then stop)
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • stinger
  • Graduate
  • Graduate
  • stinger
  • Posts: 157
  • Loc: San Jose, CA

Post 3+ Months Ago

Have your rotating cube in a movie clip.

The first frame, last frame, and frame before last will have your actionscript.

reference a variable in the main timeline.

_root.boxPlay
_root.boxCount

Your rotating box will be in its own movie clip. If it is a 20 frame animation, the 19th frame will have a if statement to check for the _root.boxPlay. Your first if statement will chack to see if _root.boxCount is equal to 2. If so, then gotoAndPlay(20). This will end the animation, and have a stop(); keyframe.

Your other, second if statement will check to see if _root.boxPlay == true. If it is then you will set _root.boxCount = 2, and also return to frame 1 or the animation. It will play one more time, and then your actionscript will verify the new veriable of boxCount.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.