RE: [Flashcoders] Image loader problem

2009-07-26 Thread Cor
Thank guys!!! It is an eye opener to see all kinds of different approaches. I will definitely look at the bulkloader but Muzak's method makes a lot of sence to me in my project for now. @Muzak, I normally only use the XML class. I notice you using XMLList. Could you explain when XML is

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Karim Beyrouti
I went for bulkloader over making my own queued loader - as it has so many tested features. Here is a little code to help get you started ( if you need it )... Instantiate the loader... code // New Bulk Loader imgLoader = new BulkLoader( 'NameOfLoaderInstance');

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Muzak
When you get a elements from an XML object through e4x it return an XMLList. The following would throw an error: var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; var imgs:XML = data.img; //output: TypeError: Error #1034:

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Muzak
Would be nice if you could just throw data at it in one go, rather than having to iterate through your data and adding them one at a time. Something like this: var data:XML = data img src=jpg/cinematic001.jpg / img src=jpg/cinematic002.jpg / img src=jpg/cinematic003.jpg / /data; var

RE: [Flashcoders] Image loader problem

2009-07-26 Thread Cor
Thanks Muzak!! -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Muzak Sent: zondag 26 juli 2009 12:44 To: Flash Coders List Subject: Re: [Flashcoders] Image loader problem When you get a elements from an

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Latcho
1900 lines of code to fetch some stuff Joseph Masoud wrote: 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

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Muzak
That thought has crossed my mind as well, especially since you still have to write your own loop to add items to the BulkLoader. So in the end, using BulkLoader you'd probably end up writing about as much code as without it. If all you need to do is load a bunch of images, skip BulkLoader IMO.

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Joseph Masoud
Hello everyone, The OP did not specify what his deployment requirements are. Personally, I'm happier working with 1900 lines of well structured and reasonably well documented code. Maintainability is an essential feature of complex software systems. I referred the OP to an existing solution

Re: [Flashcoders] Image loader problem

2009-07-26 Thread Muzak
To make this conversation more constructive, it would be nice if you could point out, explicitly if you may, what would be wrong with using bulk-loader? Well, guess you missed the posts I already made in this thread. I provided both sample code and what BulkLoader is missing (IMO).