-
AS 2 - Next Frame continuous question
Simple thing here but I can't figure it out, and it's in actionscript 2.0.
emptyMC is a movie clip that includes frames of a 3D thing that I want to make turn when the user clicks the button. I want it to turn 9 frames from wherever in the movie clip it is. I thought that if I just make it go to the next frame, along with adding a value to x every time (xx+1) that it would go frame by frame along until it gets to frame 9.
Instead, it just jumps right to the last frame when you click on it. Thanks in advance for any help. Here is the code:
on (release) {
var x = emptyMC._currentframe;
while (x < 10){
emptyMC.nextFrame();
trace (x);
x++;
}
}
-
http://pat.theorigin.net
it is jumping to the end because it you are sending the nextFrame() command 10 times at once. Instead you need to trigger an onEnterFrame function that runs for 9 frames and kills itself.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|