If you are not interested in haXe, you basically need to write your own compiler that compiles objects before ABC (ActionScript Byte Code). AVM2 Review is a document available from Adobe on ABC and AVM2, which should help you get started. This is a fairly detailed document, but watch out for a few typos in the bytecode instructions.
You will also need to wrap the bytecode in the doABC tag as part of the SWF container. You can get more information from the SWF File Format documentation.
If you want the opening chapter to write data structures (optimized int formats, etc.), feel free to check out the code in asmock, the dynamic, ridiculous project I'm working on. The SWF / ByteCode generation material is a bit dirty, but there are IDataOutput wrappers ( SWF , ByteCode ) that may come in handy.
source share