Bulkloader example: loading photos with the LazyXMLLoader class

The above example works *after* the first image has loaded…a better version is coming soon, I swear.

Bulkloader has a LazyXMLLoader class that allows you to load photos without having to write repetitive Actionscript XML code over and over (a pain for every project you work on).

To use the LazyXMLLoader class, you write your xml file in a particular way. Below is an xml example that uses the LazyXMLLoader class to load photos (but the LazyXMLLoader class can load a bunch of other media types, such as FLV/F4V files, audio, text files and even other XML files)

Download the XML and .AS file



 lazyTest
 5
 10
 
 photos/
 photos/Eiseisugimoto.jpg
 
 true

 
 
 {base_path}400px-2008-08-22_Skateboarder_floating_in_the_air.jpg
 
 
 {base_path}800px-Canal_St._Skateboarders_2.jpg
 
 
 {base_path}Eiseisugimoto.jpg
 
 
 {base_path}Retrato-jura1.jpg
 
 
 {base_path}Skateboarder_grinding_public_bench_2005.jpg
 

 

NumConnections: In this example, the bulkloader instance has 5 connections (items loading) at any time.

Base Path: just set this to whatever the path is to the folder with your images. For me, since it’s a photo on my computer labelled “photos”, I just wrote “photos/”. You might write http://www.myWebsiteName.com/images/ or where you happen to have your photos.

Then any photo in the xml file is referenced by {base_path}Name-of-your-photo.jpg.