Jump to content
Search Community

Empty LoaderMax Queue?

swiftmend test
Moderator Tag

Recommended Posts

EDIT: Looks like it is,

 

DynamicIconQueue:LoaderMax.empty(true, true)

 

To clear queue & unload old data.

 

 

-----------------------------------

 

How would I "empty" a queue so that I can append new loaders to it, without it loading the old stuff again?

 

EG:

var DynamicIconQueue:LoaderMax=new LoaderMax({name: "dynamicQueue"});

var RecentDynamicallyShow:Array = []

 

function LoadDynamicImages():void {

RecentDynamicallyShow:Array = []

//array is cleared

///////////

//work out images to load here (different each time and push into RecentDynamicallyShow array

///////////

// images are loaded based on array just created

DynamicIconQueue.append(new ImageLoader("Assets/Icons/" + RecentDynamicallyShow[0] + ".png"));

DynamicIconQueue.append(new ImageLoader("Assets/Icons/" + RecentDynamicallyShow[1] + ".png"));

DynamicIconQueue.append(new ImageLoader("Assets/Icons/" + RecentDynamicallyShow[2] + ".png"));

DynamicIconQueue.append(new ImageLoader("Assets/Icons/" + RecentDynamicallyShow[3] + ".png"));

DynamicIconQueue.load()

}

 

 

How would I empty DynamicIconQueue at the beginning of that function? Currently it's just appending those to the old queue and loads the old underneath the new.

  • Like 1
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...