var loadSnd:URLRequest = new URLRequest("Roadtrip Short.aif");
var thisSnd:Sound = new Sound();
var sndTrans:SoundChannel = new SoundChannel();
thisSnd.load(loadSnd);
soundon_btn.addEventListener(MouseEvent.CLICK, playF);
soundoff_btn.visible = false;
soundoff_btn.addEventListener(MouseEvent.CLICK, stopF);
function playF(eventMouseEvent):void{
//SoundMixer.stopAll();
sndTrans = thisSnd.play();
soundon_btn.visible = false;
soundoff_btn.visible = true;
}
function stopF(eventMouseEvent):void{
sndTrans.stop();
soundoff_btn.visible = false;
soundon_btn.visible = true;
}
:-!
Returner til Flash / Silverlight
Registrerte brukere: Google [Bot]