Connecting to FMS

var duration:Number;
var stagecenter:Number = stage.width/2;

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://fms.where i'm connecting to");
var ns:NetStream = new NetStream(nc);
var vid:Video = new Video(320, 240);
const SMOOTHING:Boolean = true;
vid.smoothing = SMOOTHING;"kellogg_eval.5.12.08");

ns.addEventListener(NetStatusEvent.NET_STATUS, netstat);
function netstat(stats:NetStatusEvent){

var customClient:Object = new Object();
ns.client = customClient;
customClient.onMetaData = metaDataHandler;
function metaDataHandler(obj:Object):void{
	vid.width = obj.width;
	vid.height = obj.height;
	duration = obj.duration;
	vid.x = stage.stageWidth/2-(vid.width/2);
	vid.y = (stage.stageHeight-25)/2-(vid.height/2);

so there’s what i’ve got… here’s what i get:

ArgumentError: Error #2126: NetConnection object must be connected.
	at covierip_fla::MainTimeline/frame1()
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: was unable to invoke callback onBWDone. error=ReferenceError: Error #1069: Property onBWDone not found on and there is no default value.
	at covierip_fla::MainTimeline/frame1()

could anybody tell what’s going wrong here? i’ve been assured by the FMS host that the rtmp address they gave me is correct… thanks