Custom / dynamic SWF generation

I wonder if anyone knows how custom Flash SWF files are created where there seems to be a swf template that the user can make some changes (like text or image) and get a newly compiled swf file with their changes.

Some examples: - http://flashfreezer.com/landingconfetti/index.html

Limitations: - the user receives one output SWF file that can be played with all changes included. those. no reading from XML file or using Flashvars.

Tried different things for weeks with no luck!

+2


source to share


4 answers


There are several ways, but the most common is either using a generating SWF library (for example PHP ) or via server -side compilation.

This will usually be a regular or proprietary library that uses the same language the service runs in (and there are open source libraries for that for PHP, Perl, Python, Java, C ++ ... etc). The SWF is generated and served with appropriate headers so that the browser knows how to redirect it. This is often due to a predefined template that is then slightly modified for new input. Only occasionally does it involve manipulating the pre-generated SWF directly.



Another option is to have a command line call for the Flash IDE or Flex compiler (and, technically, this might work for CS3 and CS4, albeit very frustrating and hacky) to create a new version of the SWF on the fly. This is often slower, but generally gives a fuller feel for the product.

+1


source


You can try Swiffotron . It can modify SWF files and perform text type type substitution for both text elements and compiled ActionScript.

Here's a swiffotron xml job file that replaces some text.



And here's a SWIFOTON XML job file that modifies the instances in the scene.

+1


source


I haven't checked the site, but the only way I can think of is to read the requirements information via flash (this can be done with plain html too) and then generate AS files from their templates and compile them to the server (using mxmlc or other compilers) and return SWF.

0


source


I get the impression that you are looking for SwfMill . SwfMill creates swf based on the XML file you create / define. You can use SwfMill on the server to generate swf based on user input.

0


source







All Articles