AS3 Steam RTMP LIVE video WITHOUT FLVPlayback Component

I’ve spent the past 2 days scouring Google and dozens (easily over 100) websites trying to find an answer to something that people do every day! I am absolutely disgusted that this info is not available anywhere online.

I can play my live rtmp (fms) stream through the FLVPlayback component without any problems. I even figured out how to make my own player in AS2. But I still can not get a LIVE player in AS3. I keep getting “onMetaData”, “Async” and “onBWDone” errors in varying combinations.

Can someone, please find it in their heart to provide me with the appropriate code? Every single tutorial online is either AS2 or is for flvplayback (nc.connect goes to null).

Here is my working AS2 code. I have a “linked video” thing from the library named “live_feed” on the stage.

//connect to the Flash Media Server
client_nc = new NetConnection();
client_nc.connect("rtmp://12.34.56.789/live/");

//bring in video/audio
in_ns = new NetStream(client_nc);
in_ns.play("livestream");

live_feed.attachVideo(in_ns);
live_feed.attachAudio(in_ns);

Here is my AS3 code which works, but Flash CS4 outputs this error.

Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onBWDone. error=ReferenceError: Error #1069: Property onBWDone not found on flash.net.NetConnection and there is no default value.
at Untitled_fla::MainTimeline/frame1()

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://12.34.56.789/live/");

function netstat(stats:NetStatusEvent) {
	//trace(stats.info.code);
}

nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);

function onNetStatus(event:NetStatusEvent):void {
	if (event.info.code=="NetConnection.Connect.Success") {
		var ns:NetStream=new NetStream(nc);

		var vid:Video=new Video(320,240);
		this.addChild(vid);

		vid.attachNetStream(ns);

		ns.play("livestream");
		ns.addEventListener(NetStatusEvent.NET_STATUS, netstat);
		ns.client=this;
	}
}

Here is YET ANOTHER (AS3) attempt of mine, which works, but yet again outputs a (different) error. This one involves a “linked video” thing from the library named myVideo on the stage.

Error #2095: flash.net.NetStream was unable to invoke callback onMetaData.

var nc:NetConnection = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.connect("rtmp://12.34.56.789/live/");


function onNetStatus(event:NetStatusEvent):void {
	if (event.info.code=="NetConnection.Connect.Success") {
		var ns:NetStream=new NetStream(nc);
		myVideo.attachNetStream(ns);
		ns.play("livestream");
		ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
	}
}

function asyncErrorHandler(event:AsyncErrorEvent):void {
	trace(event.text);
}

nc.client=this;