# There is no method with this name "attachNetStream" What's wrong?

**URL:** https://forum.kirupa.com/t/there-is-no-method-with-this-name-attachnetstream-whats-wrong/331864
**Category:** flash
**Created:** [November 11, 2013, 6:22pm UTC](https://forum.kirupa.com/t/there-is-no-method-with-this-name-attachnetstream-whats-wrong/331864 "2013-11-11T18:22:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ecptavares](https://avatars.discourse-cdn.com/v4/letter/e/9d8465/32.png) [@ecptavares](https://forum.kirupa.com/u/ecptavares)
#### Post date: [November 11, 2013, 6:22pm UTC](https://forum.kirupa.com/t/there-is-no-method-with-this-name-attachnetstream-whats-wrong/331864/1 "2013-11-11T18:22:19Z")

</div>

Hi!

I am using this code to load a FLV file into a video player but I am getting an error message saying that there is no method attachNetStream.

```auto

var vp : Video = new Video(320,240);
addChild(vp);

var nc : NetConnection = new NetConnection();
nc.connect(Null);

var ns : NetStream = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS,onStatusEvent);

function onStatusEvent(Stat : Object) : Void
{
	trace(stat.info.code);
}

var meta : Object = new Object();

meta.onMetaData = function(meta : Object)
{
	trace(meta.duration);
}

ns.client = meta;

vp.attachNetStream(ns);

ns.play("ffTrailer.flv");

```

Can anyone please help me?

thank you
