PDA

View Full Version : Flash timing?!


eyeluvmyimac
Feb 12, 2004, 10:36 PM
Hey guys, I not very experienced in the flash neighborhood, but i can find my way around enough to make something at least half way decent.

But getting to the point --> i made a simple flash movie that was timed to music that i had playing in its own layer of the flash movie. When i watched it through Flash MX it was fine, perfectly synched. When I exported and watched in Flash Player (locally) it was still fine. But when I uploaded it to the site and watched it through a browser, the music was like 2 or 3 seconds out of sync with the rest of the flash movie. (roughly 2 or 3 seconds ahead of the rest of the movie.

I'm thinking perhaps a preloader would solve this problem, but I'm not sure how to make one. I've searched google but found nothing useful. Ive heard there is one in the manual, but my manual is at home and I won't be going back home for another two weeks. Thanks so much for any responses.

If the problem isn't that I need a preloader, what do you think it might be?

slightly
Feb 14, 2004, 09:26 AM
Hi

How did you call in your music? The best way I've found is to create a separate layer for all music events, and then use actions on the appropriate frames to start a music track, reduce volume, or whatever I need to do with it.

And, yes, a preloader would also help you out. One easy way is to set up two scenes in your file, loader (loaded first) and main, and in loader, set up an Actionscript loop over two frames that checks the bytes loaded, compares to the total bytes, and loops until the two are equal, when it loads the main scene. You can add whatever animations you like during the loading process. Doing a quick Google on "getBytesLoaded" should give you some examples.

Matt

Fat Tony
Feb 14, 2004, 02:48 PM
How do you have your audio set in the fla? Stream, Start, Event??

eyeluvmyimac
Feb 14, 2004, 03:01 PM
I just imported the .aiff into the library, then drag/dropped it into the first frame of the movie (in its own layer titled "music")

But I've since come up with a workaround for the problem -- first, I figured out how to make preloader, which didn't fix the problem but I'm glad I know how now -- and second I just kept doing trial and error, moving the animations to where I thought it might be timed properly, exporting, uploading, watching, and repeating. Very long, drawn out process but it worked. I'm sure there is a way to fix whatever was happening but it doesn't matter now. There must also be a better way to implement music into flash movies because surely that is not the best way to time them together.

Thanks so much for your help everyone.

agreenster
Feb 14, 2004, 03:41 PM
You HAVE to set the sound clip to STREAM. Make sure your publish settings have the stream turned on and with the appropriate compression.

ptown
Feb 18, 2004, 12:31 PM
Yes,

You have to set the music to stream. No matter how much you tweak the animation and sound, it will never be consistent. I tried this before with a cartoon that was supposed to be talking, and tried to time the mouth opening and closing with the audio track in the background. After hours of frustration it finally worked when the sound was set to stream. Also i would recommend the following two sites

www.actionscripts.org
www.flashkit.com

Both have awesome tutorials and forums