My goal is to make a flash/as3 program that would pull multiple sets of data (images and texts) from the database and compile and save a flash video project for each one. What might be the best way to go about making this work? I checked but wasn’t able to find a function that would publish the flash project in it’s current state, so I don’t think I can execute the entire process in a single flash/as3 file. My only other option is to have some other program/batch file take care of the querying the database and compiling multiple flash/as3 movies by starting up a flash program and passing it the parameters of the data it needs to build 1 complete project for 1 set of data. Is there a program that can help me create .swf files automatically? Is it even possible to pass in init params to flash/as3 project? Any thoughts or ideas on this would be greatly appreciated :)!
Share
I’m not sure if I’ve understood your question in entirety, but you could use the command line compiler
mxmlc.exefrom the Flex SDK to compile your flash project dynamically.You may generate the code (with your application) for your flash application as
.asfile, where you can use embed statements for your images and string variables for your text. This generated main class should use code from other class to handle these "dynamic data". Then give that generated class to the compiler as start point for your flash application and you will get a.swfas result.Edit
Here an example for a static class that handled the dynamic data.
And here an example for the generated main class
Now give
Mainto the compiler as start point.At all, this is only a simple example and could be far more generalized using arrays,
Vector<T>and Interfaces and so on.