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;
};
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 You capture that and change the _alpha to 100 to your replay button