Hi All…
I have a bit of a problem… I am loading an external Movie via FLVPlayback, after the movie has played - the REPLAY button shows up. Everything works except the REPLAY button shows up for a couple of seconds before the movie starts playing. I’m thinking that it’s because of my ‘If’ statement, which checks if the movie is PLAYING to show(or hide) the replay button… I’m super new to AS… can someone please help me out with how I can change the ‘if’ statement to look weather the movie is loading or playing…(if that’s the best way to go) I really appreciate any help and THANKS IN ADVANCE!!! Here’s the code:
import fl.video.*;
replay_btn.visible = false;
var myVideo:FLVPlayback = new FLVPlayback();
myVideo.source = “mgv_video.f4v”;
myVideo.skin = “SkinOverPlaySeekStop.swf”;
myVideo.skinAutoHide = true;
myVideo.skinBackgroundColor = 000;
myVideo.skinBackgroundAlpha = .5;
myVideo.width = 960;
myVideo.height = 540;
myVideo.addEventListener(VideoEvent.COMPLETE, completePlay);
replay_btn.addEventListener(MouseEvent.MOUSE_UP, replay);
function completePlay(e:VideoEvent):void {
removeChild(myVideo);
}
function replay(e:MouseEvent):void {
addChild(myVideo);
myVideo.play();
}
if(myVideo.playing) {
replay_btn.visible = false;
} else {
replay_btn.visible = true;
}
addChild(myVideo);