Haxe is a very interesting project that is a scripting language that can create SWF for Flash.
Haxe has now added Flash9 Assembler library called hxASM and released version 1.1.4 that includes performance updates for Flash9 SWFs compiled using Haxe scripting.
I have to compile SWFs dynamically right now in a service and this is a very attractive solution with the new version and the performance improvements. Previously there was some slow down and only static content really worked well but if this is equal or a 30% improvement that is excellent.
Flex 2 can also compile at the command line you can compile flash9 swf with or without the flex2 libraries, when using mxml the flex libraries are included which add 100k or so minimum. It is not required to compile with flex 2 libraries though.
Full Haxe API (includes all flash libraries)