Does anyone know how to add a custom 'Play' button to a .swf containing a .flv file. I have the following code that works perfectly (but its AS3) - I would like it to work with older flashplayers if possible:
import fl.video.VideoEvent;
import fl.video.VideoState;
video.addEventListener(VideoEvent.STATE_CHANGE,showButton);
playVideoButton.addEventListener(MouseEvent.MOUSE_UP,playVideo);
function playVideo(event:MouseEvent):void {
video.play();
playVideoButton.visible=false;
}
function showButton(event:VideoEvent):void {
switch (event.target.state) {
case "stopped" :
playVideoButton.visible=true;
break;
case "playing" :
playVideoButton.visible=false;
break;
case "paused" :
playVideoButton.visible=true;
break;
}
}
Also, is there a way of making sure the .flv has fully loaded before it plays, or do I have to use a container?
Thanks...