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!
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.
source to share
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.
source to share