Title: [ActionScript 3] package { import flash.accessibility.Accessibility; import flash.display.S Author: nanyobis Pastebin link: http://pastebin.com/nDxFmWZf First Edit: Friday 9th of August 2013 10:07:24 PM CDT Last Edit: Friday 9th of August 2013 10:07:24 PM CDT package {         import flash.accessibility.Accessibility;         import flash.display.Sprite;         import flash.events.*;         import flash.net.NetConnection;         import flash.net.NetStream;         import flash.media.Video;           public class NsExample extends Sprite         {                 private var nc:NetConnection;                 private var ns:NetStream;                 private var ns2:NetStream;                 private var video:Video;                                 public function NsExample()                 {                         video = new Video();                         addChild(video);                                                        nc = new NetConnection();                         nc.client=this;                         nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);                         nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onError);                         nc.connect('rtmp://live.7cast.net/live');                 }                   private function startStreaming()                 {                         ns = new NetStream(nc);                         ns.client = this;                         ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);                         ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onError);                         ns.play("ovaxh37k9yep18z");                         video.attachNetStream(ns);                 }                 private function startStreaming2()                 {                         ns2 = new NetStream(nc);                         ns2.client = this;                         ns2.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus2);                         ns2.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onError);                         ns2.play("28ersrh937obs02");                         video.attachNetStream(ns2);                 }                 private function onNetStatus(event:NetStatusEvent):void                 {                         switch(event.info.code)                         {                                 case 'NetConnection.Connect.Success':                                 trace('NetConnection.Connect.Success');                                 startStreaming();                                 break;                                                                 default:                                 trace(event.info.code);                                                                 case 'NetStream.Play.Stop':                                 startStreaming2();                         }                 }                 private function onNetStatus2(event:NetStatusEvent):void                 {                         switch(event.info.code)                         {                                 case 'NetConnection.Connect.Success':                                 trace('NetConnection.Connect.Success');                                 startStreaming();                                 break;                                                                 default:                                 trace(event.info.code);                                                                 case 'NetStream.Play.Stop':                                 startStreaming();                         }                 }                 private function onError(event:AsyncErrorEvent):void                 {                         trace(event);                 }                 public function onMetaData(data)                 {                         var ar = data.height / data.width;                         video.width = stage.stageWidth;                         video.height = video.width * ar;                         video.x = (stage.stageWidth - video.width)/2;                         video.y = (stage.stageHeight - video.height)/2;                 }                 public function onBWDone ()                 {                         trace("on Bandwidth Done ");                 }         } }   output   NetConnection.Connect.Success NetStream.Play.StreamNotFound NetStream.Play.Reset NetStream.Play.Start NetStream.Play.StreamNotFound NetStream.Play.Reset NetStream.Play.Start NetStream.Play.StreamNotFound NetStream.Play.Reset NetStream.Play.Start NetStream.Play.StreamNotFound NetStream.Play.Reset NetStream.Play.Start NetStream.Play.StreamNotFound   note   swf preview appears. no video. livestreaming from source 2.