I have the following code, got from a totorial online, but have problems getting the stream to play in the flash player.
Code:
import flash.net.URLRequest;
import flash.media.Sound;
import flash.ui.Mouse;
import flash.media.SoundChannel;
var loadSnd:URLRequest = new URLRequest("http://s7.voscast.com:7174/");
var thisSnd:Sound = new Sound();
//////////////////////////////////////////////// Stop Button
var sndTranse:SoundChannel = new SoundChannel();
thisSnd.load(loadSnd);
play_Btn.addEventListener(MouseEvent.CLICK,playF);
stop_Btn.addEventListener(MouseEvent.CLICK,stopF);
stop_Btn.visible = false;
function playF(event:MouseEvent):void{
SoundMixer.stopAll();
sndTrans = thisSnd.play();
play_Btn.visible = false;
stop_Btn.visible = true;
}
function stopF(event:MouseEvent):void{
//SoundMixer.stopAll();
sndTrans.stop();
play_Btn.visible = true;
stop_Btn.visible = false;
}
I have tried: Flex/Flash Shoutcast player How to stream a shoutcast radio broadcast in Flash (Shoutcast Flash Player)
I am using the latest Flash Builder with AS3.
Can someone please show me the right way to get audio playing.
Thanks