1 Reply Latest reply on Dec 22, 2009 4:46 PM by kglad

    set actions to stream

    r_tist Level 1

      Hi,

       

      I am wondering how I can edit this script in order to make the mp3 stream. I tried adding 'true' after the name of the mp3, but that did not work.

       

      Thanks...

       

      var loadSnd:URLRequest = new URLRequest("Icelands.mp3");

      var thisSnd:Sound = new Sound();

       

      var sndTrans:SoundChannel = new SoundChannel();

       

      thisSnd.load(loadSnd);

       

      play_btn.addEventListener(MouseEvent.CLICK, playF);

      stop_btn.visible = false;

      stop_btn.addEventListener(MouseEvent.CLICK, stopF);

       

      function playF(event:MouseEvent):void{

      sndTrans = thisSnd.play();

      play_btn.visible = false;

      stop_btn.visible = true;

      }

       

      function stopF(event:MouseEvent):void{

      sndTrans.stop();

      stop_btn.visible = false;

      play_btn.visible = true;

      }