Re: [Flashcoders] Image loader problem

2009-07-25 Thread Muzak
You don't need an array of urls, as you have no use for them, you need an array of loader instances, so that you have the correct order (as they are in the xml). With e4x getting to the image urls is easy, and looping through them as well, so there really is no need to have them in a seperate ar

Re: [Flashcoders] Image loader problem

2009-07-25 Thread Paul Andrews
Cor 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: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfi

Re: [Flashcoders] Image loader problem

2009-07-25 Thread jared stanley
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, basi

Re: [Flashcoders] Image loader problem

2009-07-25 Thread Joseph Masoud
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].

RE: [Flashcoders] Image loader problem

2009-07-25 Thread Cor
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: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com

RE: [Flashcoders] Image loader problem

2009-07-25 Thread Cor
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

RE: [Flashcoders] Image loader problem

2009-07-25 Thread Cor
Thanks Gerry, I have got the values this way, but the next problem is that I would like to handle this in my Image class (which is the loader) but I can't seem to get to these values from the parent class. I tried it with public var but somewhere they get lost?? -Original Message- From:

Re: [Flashcoders] Image loader problem

2009-07-25 Thread Gerry
Try... loader.content.width or loader.contentLoaderInfo.width 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. or You could bulk load the images and stuff them in an array then use a loop to run

[Flashcoders] Image loader problem

2009-07-25 Thread Cor
Hi list, I am loading a lot of images dynamically from xml. Therefore I use a class file to handle the loading. When loaded I want to position them besides each other. Every image has a different width/height. So I want to grab the width from the first loaded and use that to set the .x from the ne