Sound problem

I am tryin to add sound to my flash site and its proving difficult.
I want to sound to loop but in my movie i have a ()stop function
So i need to do it with action script i want it to play automatically after it has all loaded does any1 know how to do it

-Tom

Yep…

on (release) {
	mySound = new Sound(this);
	mySound.attachSound("myMusic");
	mySound.start(0, 99);
}

Now open your library, right click on the sound you want to load, choose “linkage…”. Select the checkbox that says “Export for Actionscript” then give it the name “myMusic” (without quotes).

99 is the amount of loops.

cheers but that is for a button i need it to load automatically
So On(release) doesnt work
and how cum my preloader doesnt work with that

-Tom

Oh, duh me, That is what I get for taking that from a file on my computer about sound on off buttons.

	mySound = new Sound(this);
	mySound.attachSound("myMusic");
	mySound.start(0, 99);

Just add that code to your frame, tah dah.

What do you mean about your preloader?

well when i have a sound layer the preloader doesnt load up and i dont know why it just freezes do i need to sound layer in any particular place.

Im also only using a loader component up to now

-Tom

Try adding the sound actions AFTER your preloader. That should work.

I don’t know anything about the preloader component, but considering the many posts here about problems with it, I am not sure I even want to try it.

the sound is after the preloader component ill figure it out i hope

-Tom

Just a theory, but since I am supposing you can designate the action for if all the frames are loaded.

You can insert the code there.

so its like if the frames are loaded, goto and play whatever, and then add the sound code after that.

Again just theory, but I guess it is worth a try.

cheers ill try it out

No problem. I hope it works out.

no luck if u would be able to look at the fla for me i’d be grateful but i cant attach it coz its too big i think

-Tom

Do you have a server you could upload to so I can download it?

ok members.aol.com/notnowtom/private/site.zip

that should let u download if it doesnt i have msn messenger i can send it over that

-Tom

or just email it

Very interesting. I don’t know enough to know how to fix it.

I think I know why it doesn’t work though. I think it starts loading the song because it is in the library and it is loading the library beforehand. Just theory (me and my theories)

Anywho, you can try dynamically loading it into Flash…

http://www.kirupa.com/developer/mx/loading.asp