Help With Listener and FLV

I'm trying to tell when my FLV is completed playing. I have a one frame flash doc with the FLVPlayback instance in the root and named correctly.

I have this in the timeline:

var MyListener = new Object();
myListener.end = function(eventObject):Void
{
      trace("video ended");
      trace(eventObject.target);
      trace(eventObject.type);
      
}

_root.myDisplay.addEventListener("end",myListener);

It doesn't work. Any ideas on what I'm doing wrong?

LVL 1
clickclickbangAsked:
Who is Participating?
 
blue-genieCommented:
myDisplay.addEventListener("end", completeListener);
function completeListener(evt_obj:Object):Void {
     trace("video ended");
     trace(eventObject.target);
     trace(eventObject.type);
}

blu
0
 
blue-genieCommented:
wait wait,
change that "end" to complete

myDisplay.addEventListener("complete", completeListener);
function completeListener(evt_obj:Object):Void {
trace("video ended");
trace(eventObject.target);
 trace(eventObject.type);
      
}
0
 
clickclickbangAuthor Commented:
Those viewing PAQ please make note of code change in the second post....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.