# Connecting to FMS

**URL:** <https://forum.kirupa.com/t/connecting-to-fms/291191>\
**Category:** Uncategorized\
**Created:** [June 25, 2009, 11:26pm UTC](https://forum.kirupa.com/t/connecting-to-fms/291191 "2009-06-25T23:26:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mak\_Valley](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mak\_Valley](https://forum.kirupa.com/u/Mak_Valley)\
**Post date:** [June 25, 2009, 11:26pm UTC](https://forum.kirupa.com/t/connecting-to-fms/291191/1 "2009-06-25T23:26:29Z")

</div>

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

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

ns.play("kellogg_eval.5.12.08");
//ns.play("rtmp://flash.edgecastcdn.net/000ED3/clientvideos/kellogg_eval.5.12.08"); 
//ns.play(root.loaderInfo.parameters.file);

ns.addEventListener(NetStatusEvent.NET_STATUS, netstat);
function netstat(stats:NetStatusEvent){
	//trace(stats.info.code);
}

// METADATA
var customClient:Object = new Object();
ns.client = customClient;
customClient.onMetaData = metaDataHandler;
function metaDataHandler(obj:Object):void{
	//trace(obj.width);
	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:

```auto

ArgumentError: Error #2126: NetConnection object must be connected.
	at flash.net::NetStream/construct()
	at flash.net::NetStream()
	at covierip_fla::MainTimeline/frame1()
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 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
