Page 1 of 1

Flash looping - what the heck am I doing wrong?

Posted: Thu Dec 06, 2007 5:20 pm
by sfb
I'm sure I overlooked something, but I can't see where.

I did a really simple animation for a webpage placeholder. It's not high-art, I didn't have much time available to create it. Anime Studio 5.5 on a Vista Ultimate PC.

I want it to loop. I've always used GoLive or hand-coded, but this one I tried in Dreamweaver CS3 - shouldn't make any difference, the html looks right.

http://www.rcbhsreunion.com/

Any ideas? Help would be greatly appreciated.

Thanks,

Scott

Posted: Thu Dec 06, 2007 5:56 pm
by heyvern
I looked at the SWF all by itself (not embedded) and noticed that SOME of the snow continues to loop after it "stops" at the end.

It could be that the frames of the SWF that should loop are not all on the same spot. Only some of the animation is looping. It would help to see the AS file. Could solve this quickly.

There seems to be a link in the SWF? A redirect possibly? When I right click over the swf in the HTML and choose rewind then play, I get redirected to another page. Almost like there is something in the SWF that isn't getting played... a frame at the end of some kind.

EDIT:
the html looks correct

-vern

Posted: Thu Dec 06, 2007 6:23 pm
by slowtiger
Try to put a step keyframe into every channel you animated at the last frame.

Maybe I completely misunderstand.

Posted: Thu Dec 06, 2007 7:07 pm
by sfb
I don't have any looping within the Anime project. I thought loop in the html would essentially rewind and play the 120 frames. Not true?

The project is here now:

http://www.rcbhsreunion.com/Jan2008.anme

Scott (obvious newb)

Posted: Thu Dec 06, 2007 7:24 pm
by slowtiger
Unlike QT video which can be set to loop or one-shot within the HTML, SWF files need to have all parameters inside. The default behaviour of an SWF exported from Flash is to loop endlessly. The same should be true for SWFs rendered from AS, and I successfully tried that.

If your SWF doesn't loop, you need to tweak your AS file or your export parameters.

Try with a new file in which only some easy object moves. Does that SWF loop? If not, play with the export settings until it does. Then check your problem file. As vern already mentioned, look for cycles and actions which may extend animation beyond your last frame.

Posted: Thu Dec 06, 2007 7:47 pm
by heyvern
Piece of cake!!!

Open your AS project. Under File/Project Settings... check the box that says Extra SWF Frame.

Export a new SWF and it should loop properly now.

-vern

Posted: Thu Dec 06, 2007 7:55 pm
by slowtiger
Ah, that one! Still a miracle to me. I had a file which would export to SWF and persistantly duplicate the last frame of a character over the entire length. Once I checked this mystery button, it disappeared.

THANKS!!!

Posted: Thu Dec 06, 2007 7:58 pm
by sfb
Thanks Vern, I had read a bit in the forums about that option, but I didn't realize what it really does. I'm going to have to look into again, but it's good enough that it works!

Thanks slowtiger too. I'm learing a lot.

Scott

Posted: Thu Dec 06, 2007 8:04 pm
by heyvern
I think that "extra frame" is "fixing" a redraw "bug" in the SWF format. The extra frame forces a redraw to "nothing" so the loop doesn't repeat the image.

In this example it is repeating the last image... so if looks like it isn't looping.

This setting in my opinion should be the default as it nearly always causes trouble with looped SWF files. I don't even know if you can export an SWF from AS that DOESN'T loop.

-vern

Posted: Thu Dec 06, 2007 10:42 pm
by slowtiger
I don't think so, because you built such an SWF in Flash by explicitely placing a "stop" command in the last frame.