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 video:Video;                                 public function NsExample()                 {                         video = new Video();                         addChild(video);                                                        nc = new NetConnection();                         nc.objectEncoding = 0;                         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("fejke5o3a35nyt7");                           video.attachNetStream(ns);                 }                                 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);                         }                 }                 private function onError(event:AsyncErrorEvent):void                 {                         trace(event);                 }                 public function onMetaData(data)                 {                         for(var i in data){ trace(i + " = " + data[i])}                         video.width = data.width;                         video.height = data.height;                         video.x = (stage.stageWidth - video.width)/2;                 }                 public function onBWDone ()                 {                         trace("on Bandwidth Done ");                 }         } }   output   NetConnection.Connect.Success NetStream.Play.Reset NetStream.Play.Start videodatarate = 0 audiosamplerate = 44100 framerate = 10 duration = 0 width = 640 videocodecid = 7 height = 480 audiosamplesize = 16 audiodatarate = 62.5 audiocodecid = 10 filesize = 0 stereo = false encoder = Lavf54.63.100 NetStream.Play.UnpublishNotify NetStream.Play.StreamNotFound NetStream.Play.PublishNotify NetStream.Play.Stop NetStream.Play.Reset NetStream.Play.Start videodatarate = 0 audiosamplerate = 44100 stereo = false duration = 0 audiodatarate = 62.5 width = 640 audiocodecid = 10 height = 480 encoder = Lavf54.63.100 videocodecid = 7 audiosamplesize = 16 filesize = 0 framerate = 10   notes   still working apparently. goal...