views:

143

answers:

2

For examples sake, lets say I have a Flash SWF on my web server. The SWF is quite simple, it just displays a text string in some font in the middle of the stage. The SWF takes certain parameters, one of which determines what text string is displayed. So if the parameter's value is "hello world!" the SWF would display the text "hello world!" in the middle of the stage.

Is it possible using either Actionscript or some type of server-side code to generate a copy of this SWF except it would have the parameter text baked into it?

It sounds kind of confusing so let me give an example:

  1. You specify the parameter value of "hello stack overflow!"
  2. Some server-side or actionscript process takes place
  3. A SWF is created that has the "hello stack overflow!" text baked into it without the need for the parameter.

So I could take this newly created SWF and display it on a webpage and it would say "hello stack overflow!", but I would no longer have to feed it the parameter of "hello stack overflow!".

Basically what I'm looking for, is to create a SWF with static content from an SWF that was feed dynamic content. Is this possible?

edit

Thanks for the replies guys. I'll try those out.

+1  A: 

mxmlc will compile swfs on a server. It is resource intensive, but certainly possible. Probably much easier to dynamically generate the html that wraps and loads the swf and pass in specific dynamic flashvars.

Joel Hooks
+1  A: 

haXe will also compile on the server, but is much less resource intensive than mxml ... for what you described, swfmill should also suffice ...

greetz

back2dos

back2dos