Simple AS2 Load Queue
For some reason I’ve found it hard to find a simple and easy to modify Multiple Loader Class. Be it images, swfs, xml, or maybe a custom implementation like loading items into a “Screen” (a class i use for managing pages and transition), this load queue will tell the overall progress as well as individual progress for the item current loading.
Import com.tonp.utils.LoadQueue;var my_xml:XML = new XML(); var mc_drop:MovieClip = createEmptyMovieClip(“mc_drop”,1); Var lq:LoadQueue = new LoadQueue(); lq.add(“image”, “images/1.jpg”, mc_drop, {}); lq.add(“image”, “xml/test.xml”, my_xml, {}); lq.onLoadInit = Delegate.create(this, onLoadInit);
lq.start()
Callback functions are fired by the LoadQueue Object are in two sections, events fired for the current item in the queue, and events for the overall progress of the queue:
Item Events
onLoadItemStart
onLoadItemError
onLoadItemProgress
onLoadItemComplete
onTotalLoadComplete
Overall Events
onLoadStart
onLoadProgress
onLoadComplete
onLoadError
The functions return attributes similar to the LoadMovie() Object where possible.
January 12th, 2008 at 9:17 am
Thanks for information.
many interesting things
Celpjefscylc
March 4th, 2008 at 11:29 am
hi,
thanks for your class draft. to me it looks pretty much broken because it does nothing at all when imported to a project. in addition the example code to initialize it don’t use the same methods as the class itself. currently i’m working on it and will send you the bug fixed version when it’s done.
bye
December 11th, 2009 at 5:05 am
hi,
just thanks very very much…
in as3,maybe many class for this function,but in as2 more less..
March 11th, 2010 at 9:52 pm
hi,
jist thanks very very much…
in as3,maybe many clzss for this function,but in as2 more less..;