Considering I’ve reached a small milestone in the project, I figured I would write a post explaining what I’ve been up to. My previous entry relates to this, as at the time I was experimenting with writing a class to encode binary data into a stream of bits. Float information was important, as the class needed to support half-precision floating point numbers, which standard PHP cannot do.
If the name of the project didn’t give it away, I am writing an SWF output (possibly input, later) library using only PHP, without the need for something like ext/ming or swflib. The name seems pretty unoriginal – SWF is pronounced swiff, so I put a P in there for PHP
. The last project which attempted this, FreeMovie, has not been updated in more than five years, was written in PHP4, and crammed into a few large files. This one is written using the PHP5 object model, and will hopefully be modular enough to extend upon as the SWF specification continues to grow.
Currently, there is a class for writing out the raw datatypes, and a set of classes for the current SWF records (RGB, RGBA, ARGB, LanguageCode, Matrix, Rect, CXForm, and CXFormWithAlpha). I have other issues/work occupying my time at the moment, but after I get back into this, I plan on starting a Google Code project for it once it can actually encode a full SWF file.
Until next time.