Flash AS3 | July 29, 2009

Adding and Manipulating Sound in AS3

For some reason I had a really tough time finding a quick and easy tutorial on how to add a .mp3 to to an AS3 project and lower the volume.

First, import your .mp3 to the library and set a linkage classname.

Linkage Screenshot

Right click on the .mp3 you have imported to your library and select 'Linkage'. Essentially, this allows you to address the .mp3 as a class.

You can then address it with the following code:

var snd:neonstart4 = new neonstart4();
var sc:SoundChannel = snd.play();
var st:SoundTransform = sc.soundTransform;
st.volume = .2; // set to 20% volume
sc.soundTransform = st;

Buy clomid online
Buy zovirax online
Buy cipro online
Buy nexium online
Buy diflucan online
Buy lasix online
Buy neurontin online
Buy synthroid online
Buy flagyl online
Buy nolvadex online

American Crime full movie The Deer Hunter download movie Practical Magic download movie The Great Escape download movie Empire of the Sun download movie Austin Powers: International Man of Mystery download movie Charlie Bubbles download movie The Deer Hunter download movie Practical Magic download movie The Great Escape download movie Empire of the Sun download movie Austin Powers: International Man of Mystery download movie Charlie Bubbles download movie