C# to SWF (Flash) compiler · Curiosity is bliss

Curiosity is bliss    Archive    Feed    About    Search

Julien Couvreur's programming blog and more

C# to SWF (Flash) compiler

 

Robin Debreuil is coding a C# to SWF (Flash) compiler.
I've always been curious about Flash, but never found a standalone compiler. Having it based on C# syntax makes it even better, no need to learn a new language!

The preview2 package that he posted is easy to use. Just edit the demo code in VS and compile it to Flash with run.bat from a command line (that needs to include the .Net SDK bin directory as part of its PATH).
It has a .Net assembly (SwfNative.dll) with dummy/empty methods matching the native Flash methods, so that you can get all the intellisense goodies in VS and get C# compiler error checking.

I'm not very familiar with the native concepts in Flash, so I found it easier to use the wrapping classes that he defined (in my very primitive experiments with the code so far). Here's the reference documentation for ActionScript, for further digging. It includes classes like TextField or MovieClip that were mapped in the SwfNative dummy assembly.

I don't know whether many Flash libraries are available out there, but it'll also be cool to have a way to import these into dummy libraries automatically and package them into the same SWF output file.

It seems a shame that he had to re-implement a C# parser/lexer though. I wonder if the Mono compiler libraries could be re-used. In the future, will compilers be broken down into re-usable piped utilities with object-based shells like Monad/MSH?

______________________________________

monad links
http://dotnetjunkies.com/WebLog/stefandemetz/archive/2004/04/20/11794.aspx

Posted by: stefan demetz (October 12, 2004 01:51 PM) ______________________________________

I like using MacroMedia. Okay, so it probably doesn't give me the same degree of fine control, but it works well for my purposes.

Posted by: elisa (October 12, 2004 10:11 PM) ______________________________________

Hi there,

there's a standalone compiler called MTASC out there. I've been using it only in personal projects, as it is still in beta stage, but it works pretty well, and it seems to be updated regulary.

URL: http://team.motion-twin.com/ncannasse/mtasc.html

Hope you find it useful.
Byez

Posted by: Daniel (November 28, 2004 09:20 AM) ______________________________________

That C# to SWF compiler is no longer available. I guess he is working at Xamlon now on a commercial product. Is there another option?

Posted by: DH (February 6, 2005 04:52 PM) ______________________________________

DH, I unfortunately don't know of another free implementation.
Robin is still working on CSWF at Xamlon though. A beta was released for download at http://www.xamlon.com/software/xamlonpro/flash/

Posted by: Julien (February 6, 2005 09:57 PM) ______________________________________

I highly recommend you check out NeoSwiff as well.

http://www.globfx.com/products/neoswiff

Posted by: darron (April 21, 2005 03:00 PM) ______________________________________

Hi Everyone :
Here also has a .net component to create the swf file.
Your can free download it.
http://www.e-iceblue.com

Posted by: MickLee (August 28, 2005 01:34 AM) ______________________________________

Hi :
There is a .net flash component , your can free download it.
ASP.NET and Win Form Supporting
http://www.e-iceblue.com
NickMichel

Posted by: NickMichel (October 24, 2005 09:30 PM) ______________________________________

Do you know how to convert .fla to .swf in C#?
thanks

Posted by: Steven (April 1, 2006 05:53 AM)
comments powered by Disqus