Can someone suggest a workaround to the following problem: I want to make an application that will create an area on stage that will be filled with images. Firstly, the images have to be 'saved' on an array. The problem for me is that I want this to be quite generic. I mean, according to a configuration file(?) or some constants(?), one build of the application may result to an SWF that will create a Rectangle area on stage filled with some graphics from virtual folder 1, while another build of the same application may result to one rectangle area and one triangle area each one filled with graphics from virtual folder 1, and folder 2 respectively. I have stuck here sometime now. Can you suggest a workaround to this?
+1
A:
I'm not sure I completely understand your question, but I've been creating a somewhat similar application in AS3 which reads from a text-file using a URLLoader, and then parses that text to figure out which images to display on screen. It's quite easy to do basic parsing using the built in String library methods. Would this technique work for your problem?
Zev
2010-07-06 17:35:47
ok you can do the parsing stuff easily ( i suppose! ) but how do you load the images using network or they are embedded in your SWF, and what if the first time you want to load 3 images, and then 10 images into an array. What if you want to load 10 images in array 1 and 5 images in array 2. Does your app does something like this?
Ponty
2010-07-06 18:02:49
I load the images using Loader objects; the idea is so someone else can update the images without modifying code. My app is set up so it loads 1.jpg, then 2.jpg, etc. until it gets an error, which is admittedly not the best way, but works. This way, it loads however many images are in the directory (if they're named properly at least).
Zev
2010-07-08 14:07:49