Skip to main content
Known Participant
September 11, 2009
Question

Rotating through an animation, hesitating with for loop?

  • September 11, 2009
  • 1 reply
  • 602 views

I need to rotate through an animation sequence.

the animation is 40 frames long and I have stop frames on 1, 10, 20, 30, and 40.

everytime the user clicks the "rotate" btn, it will go through the animation

This is the code I have on the rotate button:

on (release) {
for (var i = 0; i<=5; i++) {
  _root.play();
  trace(i);
}
}

It works for the most part, BUT, once the animation starts over again,

it hesitates for a frame when you click the rotate button then it goes back

to normal.  

Is my for loop wrong?

Thanks for the help

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
September 11, 2009

What is the purpoe of that for loop?  How often are you clicking the button?

The loop itself executes instantly, telling the movie to play() six times in that process, so it isn't clear what its purpose is.  ONe play() is sufficient to make it play().

Known Participant
September 11, 2009

Wow, I just made that a lot harder then it should have been.

What would the loop be used for then?

Ned Murphy
Legend
September 11, 2009

?  I'm not really sure--I don't see a use for it... maybe that's the solution for phase 2.

Phase 1: Collect Underpants
Phase 2: ?
Phase 3: Profit