0
votes

I am attempting to loop a portion of an animation in Adobe Flash Professional using actionscript 3.0.

I have added 2 extra layers to my project, called "Labels" and "Actionscript".

I have named the Labels layer "loop" and and added a blank keyframe at the start frame of the sequence I want to loop.

On the Actionscript layer, I have added a blank keyframe at the last frame of the project and added the following actionscript code:

gotoAndPlay("loop");

Everything works, except for the fact that the loop pauses on the last frame for about 1/2 second before looping around again.

This only seems to happen when the loop point is somewhere other than the first few frames of the project.

How can I remove this delay to make the looping seamless?

Thanks!

Steve

1
Seems like your last keyframe may be extended a couple of normal frames. - Marty
Not sure what you mean. No frames in the animation sequence repeat themselves consecutively, if that's what you mean. Every frame is different, so it's definitely not a frame content issue. - Steve Kasian
Does it freeze in the IDE, or when playing as a published SWF in the flash player? Is there any other actionscript on the timeline apart from the gotoAndPlay? - izb
It freezes the entire program on the last frame in the published SWF. Yes, there are other action scripts, but it occurs regardless of their presence. Apparently, any loop in any timeline that starts at a point beyond the very beginning of said timeline freezes on the last frame before repeating, when using the above expression to loop a sequence. I've tried making simple loops from scratch - they all do the same thing. Strange. - Steve Kasian
Perhaps there is a different method someone can suggest for looping a sequence of frames? - Steve Kasian

1 Answers

0
votes

If the frame where you want to repeat the animation is 30, try using ..

gotoAndPlay(30);

And make sure that is on a separate 1 keyframe (use F6 to create a keyframe)