Richard Lord has a quick post about a handy library that can help with the creation of AVM2 swf files from inside of PHP.
It creates the number formats used in AVM2 swfs, as described here. I created these functions for the SWX project and am releasing the code under the MIT license so it can be used in other projects too.
You can download the file directly from his blog. You can find out more about the native data format (SWX) for Flash on the SWX Format website.