Flash timing?!

Discussion in 'Web Design and Development (archive)' started by eyeluvmyimac, Feb 12, 2004.

  1. eyeluvmyimac macrumors regular

    Oct 27, 2002
    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?
  2. slightly macrumors regular


    Mar 14, 2003
    Beacon, NY

    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.

  3. Fat Tony macrumors member

    Dec 13, 2001
    How do you have your audio set in the fla? Stream, Start, Event??
  4. eyeluvmyimac thread starter macrumors regular

    Oct 27, 2002
    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.
  5. agreenster macrumors 68000


    Dec 6, 2001
    Walt Disney Animation Studios
    You HAVE to set the sound clip to STREAM. Make sure your publish settings have the stream turned on and with the appropriate compression.
  6. ptown macrumors newbie


    Jan 14, 2004

    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


    Both have awesome tutorials and forums

Share This Page