eventListener on a flv not workin'

Hey guys,
I want to add a simple “play again” button when my FLV stops playing. Pretty simple, right? For whatever reason I can’t add an eventListener when my video stops though. I can’t even trace anything. the video loads i can dynamically change the volume so it’s not like i’m referencing it wrong or something like that. Any ideas?

//stop swf playback
stop();
import mx.video.*;
//load .flv
_root.myFlv.contentPath = "../iron.flv";

//new listener to show "play again" btn
var listenerObject:Object = new Object();
_root.myFlv.addEventListener("complete", listenerObject);
listenerObject.complete = function(eventObject:Object):Void {
replayBtn._alpha = 100;
};

first guess is that you need to define the ‘complete’ function before assiging the eventListener to the flv object. like this:

//stop swf playback
stop();
import mx.video.*;
//load .flv
_root.myFlv.contentPath = "../iron.flv";

//new listener to show "play again" btn
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
replayBtn._alpha = 100;
};
_root.myFlv.addEventListener("complete", listenerObject);

i initially tried that…didn’t make a difference, unfortunately. could the FLV be rewinding prior to “completing”??

Check the NetStatus class in the help panel and you’ll find your solution very fast. When a video have finish playing it “throws” a string :slight_smile: You capture that and change the _alpha to 100 to your replay button

isn’t it netStream? for googley reference