Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
un4given

Not showing progress

Recommended Posts

Hello,

 

Does anybody know why the progress of the selfloader in my queue doesnt show?

 

The imageloader works fine.

 

import com.greensock.loading.*;
import com.greensock.events.LoaderEvent;
import com.greensock.loading.ImageLoader;
import com.greensock.*;

stop();

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

queue.append( new SelfLoader(this, {name:"self",container:this}) );
queue.append( new ImageLoader ("100_6867.jpg", {name:"image",container:image,x:0,y:0,width:220,height:274.85}));

queue.load();


function progressHandler(event:LoaderEvent):void
{
trace("progress: " + event.target.progress);
var site_loader_progress:int = 100 * event.target.bytesLoaded / event.target.bytesTotal;
mc_txt.text = site_loader_progress + "%";
}

function completeHandler(event:LoaderEvent):void
{
trace(event.target + " complete");
TweenLite.to(white,1,{alpha:0});
}

function errorHandler(event:LoaderEvent):void
{
trace("error occured with " + event.target + ": " + event.text);
}

Link to comment
Share on other sites

make sure that your heavy assets aren't on frame 1.

frame 1 of the swf should only have your actionscript code.

 

 

if you put your images and stuff on frame 1, frame 1 won't render anything until all the assets on frame 1 are loaded, more importantly I don't think that script executes until the frame is fully loaded.

 

keep frame 1 as light as possible.

 

does that help?

Link to comment
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.
×