the basic concept is this: 1. create list of images from xml in an array 2. load the first one, increment some sort of var imagesToLoad or something. 3. when that one is .COMPLETE, handle it(set dimensions or whatever you were referring to above). 4. increment a var imagesLoaded or something, basically check var imagesLoadedNum against var imagesPending. 5. either a)load next item or b)stop loading.
add in error handling and that's basically it. prob a good idea to dl the bulkloader mentioned previously and mess around with it as well. hth On Sat, Jul 25, 2009 at 6:10 AM, Cor<[email protected]> wrote: > Joseph, > > I always like to write all the code myself. :-) > But I will look at this to learn from at least and maybe using someone else > his classes. > > Thank you very much!! > > Cor > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Joseph > Masoud > Sent: zaterdag 25 juli 2009 15:04 > To: Flash Coders List > Subject: Re: [Flashcoders] Image loader problem > > Have you considered using existing bulk loaders? > http://code.google.com/p/bulk-loader/ > > You've got a relatively complex task ahead if you're going to write > the code all by yourself. > > Essentially the idea is to have two stacks, a loading stack and a > pending stack [list of assets to be loaded]. Ensure there is only one > loader in the loading stack at any time during the loading process if > order is important. > > I suggest creating a separate data type for storing information about > the images, however I think you might want to consider letting one > object deal with the loading process. > > Many thanks, > Joseph > > On 25 Jul 2009, at 13:53, Cor wrote: > >> >> To solve your issue you might write the code so that the next image in >> the sequence doesn't load >> or start to load until the previous is complete. >> >> Yes, but I dont know how. >> >> You could bulk load the images and stuff them in an array then use a >> loop to >> run through >> the array to get the image and it's properties so that you can align >> everything the way you want. >> >> Frankly I just want them in the same order as they are in my xml. >> >> >> >> >> >> _______________________________________________ >> Flashcoders mailing list >> [email protected] >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

