# Recording Video with Development Server

**URL:** <https://forum.kirupa.com/t/recording-video-with-development-server/267834>\
**Category:** flash\
**Created:** [August 6, 2008, 9:58am UTC](https://forum.kirupa.com/t/recording-video-with-development-server/267834 "2008-08-06T09:58:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkjolt](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@darkjolt](https://forum.kirupa.com/u/darkjolt)\
**Post date:** [August 6, 2008, 9:58am UTC](https://forum.kirupa.com/t/recording-video-with-development-server/267834/1 "2008-08-06T09:58:46Z")

</div>

Howdy folks,  
I’m using development server and Flash CS3. Trying to write a script that will show live webcam in the flash movie and also let the server record it as an flv file. I can’t however figure out where I’m going wrong with my code - I’m quite new to AS3. The code is below followed by the output message.

```auto
 
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/rectest1");
var ns:NetStream = new NetStream(nc);
if(Camera.names.length > 0)
{
 var cam:Camera = Camera.getCamera();
}
else
{
 trace("user has no camera");
}
var live:Video = new Video();
live.attachCamera(cam);
ns.attachCamera(cam);
addChild(live);
ns.publish("random","record");

```

Here’s the output message:

```auto
 
ArgumentError: Error #2126: NetConnection object must be connected.
 at flash.net::NetStream/flash.net:NetStream::construct()
 at flash.net::NetStream$iinit()
 at Untitled_fla::MainTimeline/Untitled_fla::frame1()

```

Media/Development server shows a client connecting but nothing else happens, any help greatly appriciated.  
thanks, dj
