Adding basic sounds in AS3

Where ‘targetSound’ is the class name you’ve exported your sound as in the FLA:

var sound:Sound = new targetSound();
var soundChannel:SoundChannel = new SoundChannel();
soundChannel = sound.play();
Tech Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑