christ

Video Gallery appears then disappears then reappears.

Recommended Posts

I get 6 videos.

6 videos appear in thumbnail and a few seconds after they disappear and reappear.

I think that charging is not complete when the 'onComplete' told me that everything was loaded.

Thanks for your help ;)

Here is my code:

 

 

var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler});


for(var i:Number=0; i < 6; i++){
    queue.append( new VideoLoader("videos/"+theVideo+".mp4", {name:"myVideo"+i, container:this, width:180, height:120, scaleMode:"stretch", bgColor:0x000000, autoPlay:false, volume:0, smoothing:true}));
}

queue.load();
 

function progressHandler(event:LoaderEvent):void {
    trace("progress: " + event.target.progress);
}


function completeHandler(event:LoaderEvent):void {
    
    for(var v:Number=0; v < nbrVideos; v++){
        LoaderMax.getContent("myVideo"+v).x = 50 + (v * (LoaderMax.getContent("myVideo"+v).width + 20));
        LoaderMax.getContent("myVideo"+v).loader.gotoVideoTime(startPreviewThumb, false); // true = lecture automatique
        
        var recupVideo:ContentDisplay = LoaderMax.getContent("myVideo"+v);
               
        // on cree des bouton sur les clips videos
        LoaderMax.getContent("myVideo"+v).addEventListener(MouseEvent.CLICK, function(e:Event):void{jeClicSurVideo(e.target.name)});
    
    }
    
    trace(event.target + " is complete!");
}

Share this post


Link to post
Share on other sites

There really isn't much I can tell from just looking at your code. Nothing really jumped out as wrong.

 

It sounds like you may have extra frames in your timeline and its looping or something. I really don't know why videos would disappear and I'm not aware of LoaderMax firing an onComplete callback prematurely.

 

SInce you say all videos are loading, I suspect LoaderMax is doing its job properly.

 

If you need more help with this, please reduce this file as much as possible, try to reproduce the issue with just 1 video instead of 6. 

If you can compress a video very small you can create a zip I can take a peek at your fla. Again, its important that the demo only have enough code and assets to replicate the problem. 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.