Flash looping - what the heck am I doing wrong?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
sfb
Posts: 27
Joined: Fri Nov 09, 2007 2:50 am
Location: Ridgeway, Ontario Canada

Flash looping - what the heck am I doing wrong?

Post 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
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post 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
User avatar
slowtiger
Posts: 6082
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Try to put a step keyframe into every channel you animated at the last frame.
User avatar
sfb
Posts: 27
Joined: Fri Nov 09, 2007 2:50 am
Location: Ridgeway, Ontario Canada

Maybe I completely misunderstand.

Post 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)
User avatar
slowtiger
Posts: 6082
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post 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.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post 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
User avatar
slowtiger
Posts: 6082
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post 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.
User avatar
sfb
Posts: 27
Joined: Fri Nov 09, 2007 2:50 am
Location: Ridgeway, Ontario Canada

THANKS!!!

Post 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
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post 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
User avatar
slowtiger
Posts: 6082
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post 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.
Post Reply