ActionScript3 Sounds

Associate
Joined
24 Apr 2007
Posts
545
Location
Rochford
Hey all, having some trouble getting an external sound to play with AS3. Am I missing an import or something?

Code:
var mySound:Sound = new Sound();
mySound.load(new URLRequest("Track1.wav"));
var myChannel:SoundChannel = new SoundChannel();


btnTrack1.addEventListener(MouseEvent.CLICK, playSound);
function playSound(event:MouseEvent):void
{
	myChannel = mySound.play();
}
 
Back
Top Bottom