开发者

ActionScript 3 problem

开发者 https://www.devze.com 2023-01-05 18:45 出处:网络
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 \'gra

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?


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号