# Event Listeners

**URL:** https://forum.kirupa.com/t/event-listeners/197247
**Category:** Uncategorized
**Created:** [August 14, 2006, 9:45pm UTC](https://forum.kirupa.com/t/event-listeners/197247 "2006-08-14T21:45:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![East\_High](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@East\_High](https://forum.kirupa.com/u/East_High)
#### Post date: [August 14, 2006, 9:45pm UTC](https://forum.kirupa.com/t/event-listeners/197247/1 "2006-08-14T21:45:24Z")

</div>

I know other people are having the same trouble with this and I’ve found a few threads that seem to solve the problem, but I’m not having any luck with it. I would like to detect the end of an .flv so I can add actions afterwards. Maybe someone here can help me out?

```auto
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(5);
myVideo.attachVideo(ns);
path = "videos/";
ns.play(path+"test.flv");
var listenerObject:Object = new Object();
// listen for complete event
listenerObject.complete = function(eventObject:Object):Void {
    trace("flv complete....");
};
myVideo.addEventListener("complete", listenerObject);

```
