Video presenter made with VideoLoader...
I made a video presenter that loads videos (mp4) and cycles through them. There are 8 videos in total around 30MB combined.
Everything loads in perfectly and plays for awhile, however, for some reason after a certain number of cycles, the screen will go black and the video complete listener never fires. It does this on random videos and is never the same video that it happens to. The managePlayer function will fire and load the video but it never fires the complete event.
Is this sufficient addition/removal of videoLoader? Am I missing something?
Any ideas why the screen would go black and the complete event never fires?
Per memory usage would it be better to make swfs rather than MP4s?
private function managePlayer():void {
//this just traces out to a window where we are at
addToDisplayIt("managePlayer");
var currAsset = media.getChildAt(mediaTracker-1);
if(currAsset.vars.type!=null) {
if(currAsset is VideoLoader){
container_mc.addChild(currAsset.content);
currAsset.playVideo();
currAsset.addEventListener(VideoLoader.VIDEO_COMPLETE, videoComplete);
}
}
}
private function videoComplete(e:Event):void {
//this just traces out to a window where we are at
addToDisplayIt("videoComplete");
var currAsset:VideoLoader = VideoLoader(e.target);
currAsset.removeEventListener(VideoLoader.VIDEO_COMPLETE, videoComplete);
currAsset.gotoVideoTime(0, false);
container_mc.removeChildAt(0);
currAsset=null;
managePlayBack();
}