I have a website which needs to play an FLV on the home page, uploaded here:
[login to view URL]
I am attempting to put a loading screen before the video plays. Presently, it is just black while we wait for the FLV to fully load. I have been playing with some AS3 code but I am missing something.
On my first frame, which contains my loading animation, I have this code:
stop();
import fl.video.*;
[login to view URL] = false;
[login to view URL] = "[login to view URL]";
function readyHandler(event:VideoEvent):void {
// Pause until the video can play till the end
[login to view URL]();
[login to view URL]();
gotoAndStop(2);
}
[login to view URL]([login to view URL], readyHandler);
On my second frame, I have the rest of the code to make the FLV play in a loop (this by the way is working fine):
stop();
//make the video loop
function onFLVComplete(event:VideoEvent):void {
[login to view URL]();
}
[login to view URL]([login to view URL], onFLVComplete);
My problem is, it ignores the code on the first frame and just jumps straight to the second frame, without making sure that the FLV has loaded enough. What I want to do is:
1. Make it stop on frame 1 until the FLV has loaded enough to play back without a black screen appearing.
2. Only go to frame 2 (and stay on frame 2) after the FLV has loaded enough.
3. Make sure that the FLV is hidden on the first frame - the first frame needs to load the FLV, but not show it, only show my little loading animation instead, which is just a little white loading circle.
I have attached my FLA file. I know this is something simple for an AS3 expert (which I am not). I will provide direct FTP access to whoever wants to fix this for me, so you can just put it on my server and test it (the FLV file is already there).