all groups > flash (macromedia) > march 2007 >
You're in the

flash (macromedia)

group:

Preloader for movie with heavy sound content


Preloader for movie with heavy sound content Rory Carlton
3/21/2007 9:44:36 PM
flash (macromedia):
I?m building a movie with a lot of sound files. They are in the Library, marked
for "Export for ActionScript". Then I attach them to a Sound object when they
need to play.

Because of the large file size, I need a preloader. For various reasons, I
want the preloader to be part of the main movie itself, not a separate movie
that then loads the main SWF. I?ve built a simple preloader with a progress bar
that sits in the first frame of the movie.

My problem is, if I mark the sound files ?Export in First Frame?, they start
downloading before the preloader progress bar can appear, I guess because
Actionscript gets executed before graphics get drawn.

So how can I have the sound files NOT be exported in the first frame, but say,
in the second frame, so the preloader has time to appear and will run while the
sound files download?

I tried putting all the sound files in a separate SWF and loading THAT as a
movieclip in frame 2. But then I have a problem accessing the sound files by
name from the main timeline. I can't work out the syntax to access the sound
clips by name inside the loaded movieclip.

Can anyone tell me EITHER how to address the sound clips by name OR how to
solve the preloader issue another way? It doesn?t seem like it should be so
hard!
Re: Preloader for movie with heavy sound content BorosAdam
3/22/2007 12:00:00 AM
one approach: leave the sounds 'export for as' BUT uncheck 'export in the first
frame'. after it create an empty keyframe somewhere in the main timeline where
you will never navigate the playhead and place ALL the sounds there.
i hope it works, never tried actually... :)

adam
AddThis Social Bookmark Button