as above
Printable View
as above
hi,
Right click the file in the library and choose linkage.
Select "export for ActionScript".
Insert an identifier, e.g.: my_sound.
Attach the following code to the main timeline:
PHP Code:var mySound:Sound = new Sound(this); // create a sound object
mySound.attachSound("my_sound"); // associate the file in the library with it
mySound.start(); // start playing
Two other good ones are:
-ChrisPHP Code:mySound.stop(); // stops the sound playing
mySound.setVolume(100); //sets the volume (0-100%)