Jump to content
Search Community

LoaderMax.parse in conjunction with prioritize ?

Thomas James Thorstensson test
Moderator Tag

Recommended Posts

Doing the following

 

LoaderMax.activate([imageLoader]);

mainQueue=LoaderMax.parse(dimVO.oneArr, {onProgress: handleAllProgress, onComplete: handleAllImagesLoaded}, {autoPlay: false});

mainQueue.prependURLs('assets/img/');

 

Where I parse an array of images.

 

Question:

 

Is there any way for me to get LoaderMax to name each image on the fly or does it somehow keep a named reference that I can acess. Cause I would like to be able to do the above

AND prioritize any requested image with

 

LoaderMax.prioritize("mylittlename");

 

 

Thanks

 

Thomas

 

 

///// EDIT //////

 

Hum a trace reveals the following of onChildComplete :

 

ImageLoader 'loader2' (assets/img/monaco_MS_14.00001.jpg)

ImageLoader 'loader1' (assets/img/monaco_MS_14.00000.jpg)

ImageLoader 'loader4' (assets/img/monaco_MS_14.00003.jpg)

ImageLoader 'loader3' (assets/img/monaco_MS_14.00002.jpg)

ImageLoader 'loader6' (assets/img/monaco_MS_14.00005.jpg)

ImageLoader 'loader5' (assets/img/monaco_MS_14.00004.jpg)

ImageLoader 'loader8' (assets/img/monaco_MS_14.00007.jpg)

ImageLoader 'loader7' (assets/img/monaco_MS_14.00006.jpg)

ImageLoader 'loader10' (assets/img/monaco_MS_14.00009.jpg)

 

That is after parsing array of images. Hmm. Can I have any control over the naming ? Otherwise I see now how it can be done I believe just use the 'loader5' I can hang the name upon my event

 

/////END EDIT/////

Link to comment
Share on other sites

With the convenience of parse() you lose the flexibility to name each loader individually.

 

For ultimate control, flexibility and minimal code I would recommend considering an XMLLoader so that you can define all your loader related info in one place and it will get automatically loaded for you once the xml file loads:

 

http://www.greensock.com/as/docs/tween/ ... oader.html

 

Sample xml format

 







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...