Here's what I've gathered about how the new flash5 actionscript bytecode engine works:

http://www.opaque.net/~dave/swf5action.html

Lots of uncertainties in there, but enough to save you a lot of time if you're just starting down the same path.

Also, my swf output library / php module, Ming, is now easier to install and use. My new best friend Christian Becker has compiled a .dll version which you can just toss into your php extensions directory and everything magically works. Full details at:

http://www.opaque.net/ming/