Hey guys,
I'm having a problem with the VideoLoader.VIDEO_COMPLETE as well. I think my code is Ok because it actually fires the function I created for the end of the video, but I still receive an error.
TypeError: Error #1034: Type Coercion failed: cannot convert com.greensock.loading::VideoLoader@475b3f11 to flash.display.MovieClip.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at com.greensock.core::TweenCore/complete()
at com.greensock::TweenMax/complete()
at com.greensock::TweenMax/renderTime()
at com.greensock.core::SimpleTimeline/renderTime()
at com.greensock::TweenLite$/updateAll()
Here is my code
var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler});
var video:VideoLoader = new VideoLoader("blablabla.f4v", {name:"bhVideo", container:vidHolder, width:720, height:406, x:-360, y:-203, bgColor:0x000000, autoPlay:false, volume:.8, requireWithRoot:this.root, estimatedBytes:1800000});
queue.append( video );
queue.load();
function playVid(){
video.addEventListener(VideoLoader.VIDEO_COMPLETE, vidComplete,false,0,true);
video.playVideo();
}
function vidComplete(event:LoaderEvent):void{
doSomething();
}