Compile swf at runtime via C #?

I would like to know if it is possible to compile a .swf file at runtime through C # (will be called through a Flex application). I read some articles about using fsch.exe, but nothing that gave concrete examples.

I am sure this is possible, so the secondary question is how much is possible on an average scale. I would like to allow users to configure swf and then compile these options directly into swf for delivery, rather than relying on an external data store to store configuration information.

Thanks in advance for any help you can offer -

Bill

+3
source share
2 answers

You should do this quite simply using the command line compiler.

You need to configure the compiler on your server. http://www.google.com.au/search?hl=en&q=swf+command+line+compiler&btnG=Search&meta=

In C # code, you can execute a shell command to invoke your compiler. http://www.google.com.au/search?hl=en&q=execute+command+shell+asp+.net&btnG=Search&meta=

One thing that needs to be careful is waiting for the compiler to complete before trying to extract the compiled file. You need to process the response from the compiler and make sure that the compilation was successful.

I do not understand why this would be impossible on an average scale.

+1
source

You can try MTASC .. it is a command line based ActionScript compiler, so you can simply use Process.Start to call it and then use the Process.WaitForExit method to wait for it to finish compiling

+1
source

All Articles