Sound linkage 'export in first frame' & preloaders

Hi all

Just found this site, it rocks!

My problem is this…

I am manipulating sounds using actionscript in flash mx. To do this i am using the library linkage options ‘export for actionscript’ and ‘export in first frame’ in conjunction with a movie that has a ‘preloader’ scene.

If i select ‘export in first frame’ then my sounds clips load before my movie’s preloader starts. This results in an unwanted delay before my preloader scene is downloaded. But if i deselect ‘export in first frame’ then I can’t get the sounds to play when my full movie starts after the loading has finished. I just don’t hear anything at all :frowning:

basically, I don’t understand how to get my sounds to play if ‘export in first frame’ is not selected. Do you have to manually export the sound clip or somthing if this option is not used? if so how?

Hope this makes sense. Please help me, I am tearing my hair out!

I see 2 solutions:
Load the sounds dynamically if they are MP3
Load your main movie in an empty movie. That way you can handle the preloading from the empty movie easily.


pom :smirk:

i have the EXACT same problem as rob_o_rant , except for i need explanation on loading the sound dynamically, sorry for my noobish ways :slight_smile:

Hi all

Thanks for your suggestions ilyaslamasse. This would have been helpful advice but I’ve figured out what the problem is and fixed it.

Apparently Flash MX isn’t smart enough to dynamically load sound clips as soon as they’re referred to in the actionscript. The sound clips have to be physically placed somewhere on the stage in a frame somewhere as well. They are then loaded when that frame is loaded and everything should work fine. So I’ve created an empty movie clip and an empty layer for each sound clips and added a stop() actionscript command in a keyframe just before the keyframes containing the clips. This stops them all being played at once when the movie first loads.

Hope this helps you as well DyersEve. (Perhaps you can think of a more elegant way of doing it like sticking them in another scene or something, but this works for me)

cheers =)

To load sounds dynamically, there’s a tute called loading techniques.

Concerning your method, rob_o_rant, if you could make it work… One thing though: when you don’t export them in the first frame, the attached movie clips are not available BEFORE the frame where they are actally put on the scene. It means that putting them in another scene would not fix the problem, cos you coukdn’t access them from the first scene.

pom :asian: