# Loaded local video stops play after a few seconds

**URL:** https://forum.kirupa.com/t/loaded-local-video-stops-play-after-a-few-seconds/322276
**Category:** Uncategorized
**Created:** [May 16, 2011, 9:52pm UTC](https://forum.kirupa.com/t/loaded-local-video-stops-play-after-a-few-seconds/322276 "2011-05-16T21:52:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)
#### Post date: [May 16, 2011, 9:52pm UTC](https://forum.kirupa.com/t/loaded-local-video-stops-play-after-a-few-seconds/322276/1 "2011-05-16T21:52:55Z")

</div>

Hello, when I use the following function in my doc class to launch a local video, the video “freezes” after a few seconds. This happens no matter what video I am trying to play.

```auto
private function startVideo(e:MouseEvent):void
        {
            var nc:NetConnection = new NetConnection();
            nc.connect(null);
            var ns:NetStream = new NetStream(nc);
            ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
            ns.client = this;
            
            ns.play("1280 x 800 Version_1.mp4");
            function asyncErrorHandler(e:AsyncErrorEvent):void
            {
                trace(e.text);
            }
            var vid:Video = new Video(); 
            vid.attachNetStream(ns); 
            vid.width = 1280;
            vid.height = 800;
            vid.x = 1024;
            vid.y = 0;
            addChild(vid);
        }

```

Any reason why this might be happening? Thankyou.
