# Buffer a video but don't play it

**URL:** https://forum.kirupa.com/t/buffer-a-video-but-dont-play-it/309392
**Category:** Uncategorized
**Created:** [May 13, 2010, 8:20pm UTC](https://forum.kirupa.com/t/buffer-a-video-but-dont-play-it/309392 "2010-05-13T20:20:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)
#### Post date: [May 13, 2010, 8:20pm UTC](https://forum.kirupa.com/t/buffer-a-video-but-dont-play-it/309392/1 "2010-05-13T20:20:58Z")

</div>

I have **1.flv, 2.flv, 3.flv** , and so on… I need play them in order and stitch them seamlessly. To do this, I was thinking of buffering **X.flv** while playing **(X-1).flv**. The problem is I don’t know how to buffer a video and not play it until the previous video has finished playing.

```php

public function playingTest():void {
 this.vid = new Video();
 this.container.addChild(this.vid);
 this.vidConnection = new NetConnection();
 this.vidConnection.connect(null);
 this.vidStream = new NetStream(this.vidConnection);
 this.vidStream.addEventListener(NetStatusEvent.NET_STATUS, this.statusChange);
 this.vid.attachNetStream(this.vidStream);
 this.vidStream.play("3.flv");
}

public function statusChange(event:NetStatusEvent):void {
 trace(event.info.code);
}

```

This would trace something like:

```auto

NetStream.Play.Start
NetStream.Buffer.Full
NetStream.Buffer.Flush
NetStream.Buffer.Flush
NetStream.Play.Stop

```

When running the program, I see the video play right when **NetStream.Play.Start** happens. The video will not wait for **NetStream.Buffer.Full**. This is not what I want. How do I make the video buffer indefinitely until I explicitly tell it to play? I will listen for **NetStream.Play.Stop** of **(X-1).flv** and then play **X.flv**.
