Hello all,
At the moment I´m working in a project where I build a swf via mxmlc including some compiled custom components via compc.
Just for testing, I created some classes and exported them as swc, and then include them in the movie.
Now it comes my question:
These swc components must include some assets (mainly a configuration.xml and some resources like images and sounds). I know I can include files when compiling the swc, but I dont know how to use them when actually I use the swc in the main movie…
Lets show you some things:
These are my compiled swc components:
compile_components.dashboard:
[exec] Loading configuration file /Developer/SDKs/Flex/frameworks/flex-config.xml
[exec] /bin/dashboard.swc (1399 bytes)
compile_components.avatar:
[exec] Loading configuration file /Developer/SDKs/Flex/frameworks/flex-config.xml
[exec] /bin/avatar.swc (1392 bytes)
Then I use them in my main movie:
var avatar:Avatar = new Avatar();
var dashboard:Dashboard = new Dashboard();
trace(avatar);
trace(dashboard);
which actually works:
[object Avatar]
[object Dashboard]
Now my wish would be to be able to set up the avatar via his own xml file. I would like to be able to use some assets included in the swc files, and configure them with certain values I will put in the configuration.xml (also included when compiling the swc and one xml per component).
The reason is simple: I want Avatar to be a fully configurable component, where i can set background images,positions, sounds, etc etc, and all that should be configurable only by changing some values in the xml file and include the assets. Then via ant, I compile the components and the main movie.
Maybe some guru out there made this before or knows how to make it.
Hope Its clear???