hxASM

http://code.google.com/p/hxasm/
is a small library for producing Flash SWF files by using directly the Flash VM assembler. Since it’s written in haXe, it can be used from commandline or on the server side for dynamic SWF generation, or directly on the client side for in-memory compilation.