PDA

View Full Version : Sound/preload problems


evilrobo
03-16-2005, 07:27 AM
Hey there. I'm fairly new to Flash still and I was excited to actually get a preloader working with my site. It's one main swf file that calls on two other swfs (preloader and the site content). Unfortunately, since migrating to the method of using a parent swf file, the sound in content.swf no longer works. This seems to be pretty common.

The only way I can get it to work is if I import all of the sound files into the library of the main swf, which basically nullifies the purpose of having a preloader in the first place. I tried using the attachSound method in the main swf, but it didn't seem to work. I even tried making a new swf just for sounds and I couldn't get that to work either. I went through the tutorials and the one I found that addressed the issue was very unclear. Could someone give me a hand? I'd really appreciate it, as this is for a rather important school project.

And before anyone freaks out, I DO know about the (this) requirement. :)

Thanks.

Nov
03-20-2005, 09:18 PM
I don't know if this will help, but here's what I do when dealing with large mp3 files.

Instead of placing the sound file on stage or library, I'd simply create a folder to hold all the files and label it music. The folder has to be where the fla file is located otherwise it wont work.

then I'd write this code for the button triggering the sound;
on (release){
sound1= new Sound();
sound1.loadSound("music/crash.wav", false);
}

(the false parameter sets the sound to behave as an event sound. true= stream)

I hope this helps

evilrobo
03-24-2005, 12:32 AM
I'll give that a shot, thanks. But most of my sounds are background music/noise that come up on the scene load. How would I handle that?

Thanks again for helping this poor noob.