I am trying to debug a LoaderMax that has a for loop of various sized clips (5) acting as container for VideoLoaders
The idea is LoaderMax - onComplete the container/VideoLoaders fade up and run in a sequence of 1st playing, 2nd playing, etc in a loop
When I try to test the project, I get wildly different results each time ie: 2,3,4 load and display, but since 1 isn't, no play (and many other permutations)
would it be better for me to make individual (hard-coded) VideoLoaders for each rather than dynamic (for loop) and to work with onChildComplete instead?
perhaps with each loading and then allowing the next to load?
here is the code
private function _initGrid ():void{
trace("_initGrid ()")
_queue = new LoaderMax({name:"videoQueue", onChildComplete:_completeChildHandler,onProgress:_progressHandler, onComplete:_completeHandler, onError:_errorHandler, auditSize:true});
var _num:int = 1
for (var i:int = 0; i < _gridClips.length; i++)
{
_videoClip = _masterContainer.addChild(new (getDefinitionByName(_gridClips[i]) as Class))as MovieClip
_videoClip.name = "VideoClip"+_num
_videoClip.addEventListener(MouseEvent.ROLL_OVER, _showVideoControls, false, 0, true);
_videoClip.addEventListener(MouseEvent.ROLL_OUT, _hideVideoControls, false, 0, true);
_videoClip.x = _gridX[i]
_videoClip.y = _gridY[i]
_videoClip.width = _gridWidth[i]
_videoClip.height = _gridHeight[i]
_loader = new VideoLoader(_videoDirectory+_num+".flv", {name:"poppy-video-"+_num, container:_videoClip, width:_videoClip.width, height:_videoClip.height, centerRegistration:true,scaleMode:"stretch", bgColor:0xFFFFFF, autoPlay:false, volume:0, estimatedBytes:1048576,checkPolicyFile:true});
// ADD FRAME
_videoFrame = new VideoClipFrame()
_videoClip.addChild(_videoFrame)
_videoFrame.width = _videoClip.width
_videoFrame.height = _videoClip.height
_queue.append( _loader );
_num++
}
_queue.load();
}