Sound off

Sound off

Innleggav srb » lør 30.01.2010 14:14

Hei der

Noen sm kan fortelle meg hvorfor denne ikke virker?
Flash spiller da vel .aif...


Kode: Merk alt
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;
                      }
 :-!
medlem i 193 måneder
 

Returner til Flash / Silverlight



Hvem er i Forumene

Registrerte brukere: Google [Bot]



cron