Hi sorry am still quite new to all of this.
I am using an instance of the FLVplayback component with the instance name of
movPlayer, the movie it is set to play is quite large and I only want to load it once it is needed (I have also set the movie to download entirely before it can be played). To do this I have created a function called
loadTrigger:
Here is my code:
Code:
function loadTrigger():void {
movPlayer.autoPlay = false;
movPlayer.source = "media/movie1.mov.flv";
movPlayer.load(movPlayer.source);
movPreview.movPreLoader.visible = true;
movPreview.movPreLoader.alpha = 1;
movPreview.movPreLoader.loaderAnim.play();
//MOVIE PLAYBACK
movPreview.movPlayBtn.addEventListener(MouseEvent.CLICK, playMovie);
movPlayer.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, hideMovPreview);
movPlayer.addEventListener(VideoEvent.COMPLETE, showMovPreview);
//MOVIE LOAD
movPlayer.addEventListener(ProgressEvent.PROGRESS, progressHandler);
movPlayer.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
trace("movie1 Load Trigger OK!");
}
This generates the following error:
This is the section of code I am having trouble with:
I know the movie file is definitely there, if I set the FLVplayback component to autoload, then everything works fine. But as I said I only want to load the movie when and if it is required due to it's size.
Any help with this code would be great, thank you for your time.