0 Replies Latest reply on Feb 19, 2012 3:23 PM by tdorman4

    streaming audio using netconnection and netstream

    tdorman4

      I'm trying to set up an audio stream using netconnection and netstream to a HEAAACV2 stream.  I followed the built in instructions, and I believe I am close, and possibly missing a key element, which I'm hoping one of you could point out.  Here is what it looks like:

         
                  private function playAudioStream():void
                  {
                     
                      nc = new NetConnection();
                      nc.connect("http://3153.live.streamtheworld.com:443/247COMEDYAAC_SC");
                     
                      nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                     
                     
                  }

      private function netStatusHandler(event:NetStatusEvent):void {
                      try {
                          switch (event.info.code) {
                              case "NetConnection.Connect.Success" :
                                  // If the current code is Start, start the timer object.
                                  ns = new NetStream(nc);
                                  ns.play();
                                  break;