[AS2.0]Multi Image Loader Class

While i was doing a little AS2.0 project i made this MultiImageLoader class.
This class will load multiple images for you and it will dispatch events.

*NOTE: This class uses the EventDelegate from the asapframework.
———-


USAGE:

var multi:MultiImageLoader = MultiImageLoader.getInstance();
multi.addEventListener( MultiImageLoader.IMAGE_START , onImageStart );
multi.addEventListener( MultiImageLoader.IMAGE_PROGRESS , onImageProgress );
multi.addEventListener( MultiImageLoader.IMAGE_COMPLETE , onImageComplete );
multi.addEventListener( MultiImageLoader.MULTILOADER_COMPLETE, onMultiComplete );

multi.store( “img/img_01.png”, photoContainer_01 ); //Image address and image holder.
multi.store( “img/img_02.png”, photoContainer_02 );
multi.store( “img/img_03.png”, photoContainer_03 );

multi.startLoad();


Events:

- MultiImageLoader.IMAGE_START ;
- MultiImageLoader.IMAGE_PROGRESS ;
- MultiImageLoader.IMAGE_COMPLETE ;
- MultiImageLoader.MULTI_START ;
- MultiImageLoader.MULTI_COMPLETE ;
———-



MultiImageLoader class:

View CodeACTIONSCRIPT

Comments are closed.


Categories
Archives
LinkedIn
R. Kollau