# OO videoPlayer

**URL:** <https://forum.kirupa.com/t/oo-videoplayer/257875>\
**Category:** flash\
**Created:** [April 17, 2008, 9:19pm UTC](https://forum.kirupa.com/t/oo-videoplayer/257875 "2008-04-17T21:19:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cullenshea](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@cullenshea](https://forum.kirupa.com/u/cullenshea)\
**Post date:** [April 17, 2008, 9:19pm UTC](https://forum.kirupa.com/t/oo-videoplayer/257875/1 "2008-04-17T21:19:25Z")

</div>

I’m trying to make an OO video player, but I can’t seem to make the NetConnection work when it’s in a class. What am I doing wrong?

class videoPlayerAS.Nc {

```
// CONSTRUCTOR
// ------------------------------------------------------------------------------------------
function Nc(){
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    ns.play(file);
    _root.video_mc.attachVideo(ns)
}

```

}

Thanks!
