Hi, I am trying to develop a Flash program that depends on some graphics and sounds and an array (among others!). My problem is the following. I want to have a folder that is called 'graphics' that will contain the graphics with predefined names (e.g.: background.jpeg, enemy.jpeg, etc) and another one that is called 'sound' with corresponding files. Is it possible when i make build the project, the Flash to read from these folders in order to take the appropriate information? I don't want to remove/add from library all the time (i know it can be done that way) so i was thinking like a configuration file that will instruct the Flash program to fetch its graphics and sounds from predefined folders. I don't know if i put it right (cause english is not my native language), but is it possible? If it is possible, then can i make an array inside Flash that will not have predefined size, but it will be specified by the elements of these folders (graphics, sounds) ? The program will be loaded on a server from where anyone can downloaded, but i don't want to transfer the graphics/sounds via a Loader through Internet. I would like to build them into SWF at build time, but without using the library. Is it possible?
+2
A:
Flash isn't able to access the file system for that kind of information. You would have to create an xml or json file with a list of assets and send that to your flash file. If the files are coming from a CMS it's pretty simple to have the json or xml file populated automatically, so it works out to almost the same thing!
DHuntrods
2010-07-02 20:27:57
If i understand right, you say that the flash file has been loaded to the client from the server and the server also sends an xml file to the client that will describe the assets will be used. The actual jpeg files can be embedded inside the xml or the client will always have to download them from the server?
Ponty
2010-07-03 05:37:09
DHuntrods
2010-07-05 08:44:26