Jump to content
Search Community

bug? LoaderMax.prepend(loader), and insert(loader, index)

nigamshah test
Moderator Tag

Recommended Posts

Hi Jack,

 

Thanks for all your hard work, and for a great addition to the GreenSock arsenal. I think I found a bug...

when I call prepend on my instance of LoaderMax, it *replaces* the first item in the queue, rather than inserting it at the top of the queue. I tried using the insert method, and no matter what index value I use, the same thing happens-- it replaces the loader at the specified index rather than inserting at that position.

 

In its simplest form:

 

_myQueue = new LoaderMax();

 

_myQueue.append( new XMLLoader(xmlpath1));

_myQueue.append( new XMLLoader(xmlpath2));

_myQueue.append(new XMLLoader(xmlpath3));

 

trace('numChildren = ' + _myQueue.numChildren);

 

// traces out 3 as expected, but...

 

_myQueue = new LoaderMax();

 

_myQueue.append( new XMLLoader(xmlpath1));

_myQueue.append( new XMLLoader(xmlpath2));

_myQueue.prepend(new XMLLoader(xmlpath3));

 

trace('numChildren = ' + _myQueue.numChildren);

 

// traces out 2

 

Maybe I'm doing something wrong?

 

Nigam

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.
×
×
  • Create New...