# Multiple event listeners

**URL:** <https://forum.kirupa.com/t/multiple-event-listeners/244526>\
**Category:** Uncategorized\
**Created:** [November 19, 2007, 12:03pm UTC](https://forum.kirupa.com/t/multiple-event-listeners/244526 "2007-11-19T12:03:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfpartners](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@cfpartners](https://forum.kirupa.com/u/cfpartners)\
**Post date:** [November 19, 2007, 12:03pm UTC](https://forum.kirupa.com/t/multiple-event-listeners/244526/1 "2007-11-19T12:03:15Z")

</div>

Hi

I’m sure this is a simple problem, but I can’t see it.

I have dynamically created multiple flv playback instances which all play different video clips simultaneously. This all works fine:

```auto
for (var i:Number=0; i<10; i++) {
this["videoPreview_mc_"+i].attachMovie("FLVPlayback", "video_flv", this["videoPreview_mc_"+i].getNextHighestDepth());
}

```

I am trying without success to add listeners to replay each flv as it ends (to loop the preview). I thought something like this would work, but none of the flvs replay and the trace is “video complete 9”:

```auto
for (var i:Number=0; i<10; i++) {
	var listenerObject:Object = new Object();
	listenerObject.complete = function(eventObject:Object):Void {
	this["videoPreview_mc_"+i].video_flv.seek(0);
   	this["videoPreview_mc_"+i].video_flv.play();
	trace("Video complete"+i);
	}	
	this["videoPreview_mc_"+i].video_flv.addEventListener("complete", listenerObject);
}

```

Thanks in advance.  
Colin
