February 2010
M T W T F S S
« Jan   Mar »
1234567
891011121314
15161718192021
22232425262728

Loading sound

Problem
Need load sound and this sound must playing automatically.

Solution
Using existing URLRequest and Sound classes and creating their objects.

Detailed explanation
Please create new file:
ls1

And on ACTIONS enter code like:

var req:URLRequest = new URLRequest("manscreamdistance.mp3");
var s:Sound = new Sound(req);
s.play();

ls2

Put your .mp3 sound to the same place with .fla file.
ls3

Then click Control > Test Movie, or just Ctrl + Enter if you use Windows OS and enjoy with your automatically sound playing.

Read more info about how work with sound.

Also read more about classes: URLRequest and Sound.

In attached files you can find all sources.
Source:
loadingSound
Thank you for reading.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>