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:
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”:
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