# \[AS2\] Very Basic FLV Playback loading then freezing within class

**URL:** <https://forum.kirupa.com/t/as2-very-basic-flv-playback-loading-then-freezing-within-class/299862>\
**Category:** flash\
**Created:** [November 11, 2009, 11:14pm UTC](https://forum.kirupa.com/t/as2-very-basic-flv-playback-loading-then-freezing-within-class/299862 "2009-11-11T23:14:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mental](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Mental](https://forum.kirupa.com/u/Mental)\
**Post date:** [November 11, 2009, 11:14pm UTC](https://forum.kirupa.com/t/as2-very-basic-flv-playback-loading-then-freezing-within-class/299862/1 "2009-11-11T23:14:45Z")

</div>

Hi, I’m having a strange problem when I use the example from the Flash CS3 help section to simply attach and playback an FLV. For some reason, if I have the following code on the root of the swf it works fine.

```auto
var video:Video = _root["my_video"];
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
		
var netStr = new NetStream(netConn);
video.attachVideo(netStr);
netStr.play("videos/video_01.flv");

```

However, if I have it in a class file. Then it will load the video but it will freeze on the first frame, sometimes playing a split second of sound and I can’t for the life of me think why it wouldn’t work.

Thanks in advance,  
Mental.
