removing an flv file after playback is complete

playing an flv file using Flash 8 video playback component.  
how do i completely remove/close/unload the flv file when playback has finished?

tried:
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
    // insert event-handling code here
      myFLVplybk.close();
};
myFLVplybk.addEventListener("complete", listenerObject);

where "myFLVplybk" is assigned as the instance name of the FLVPlayback component.

what am i doing wrong?  i want the flv to play until the end, then go disappear.

thanks!
winstonmortimorAsked:
Who is Participating?
 
Aneesh ChopraCommented:
Hi,

Use a dummy flv name as contentPath in complete event, flv will be unloaded.

here is example code:
----------------------
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
    // insert event-handling code here
    myFLVplybk.contentPath="dummy.flv";
};
myFLVplybk.addEventListener("complete", listenerObject);
----------------------

Rgds
Aneesh
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.