Pwiff Source Released

Today, I was able to get Pwiff to create a “blank” SWF file, meaning a header, a FileAttributes tag, and an End tag. As a result, I decided to start a Google Code project for it, and host the files there instead of my private subversion location. It’s very bare bones right now, as you can see from the following example that created the 25-byte file:

$env = new Pwiff_Environment;
$env->setSwfVersion(10);

$out = new Pwiff_Output_File('test.swf');

$h = new Pwiff_Record_Header(false, 10, 25, new Pwiff_Record_Rect(0, 100, 0, 100), 0, 0);
$f = new Pwiff_Tag_FileAttributes($env);
$e = new Pwiff_Tag_End($env);

$h->write($out);
$f->write($out);
$e->write($out);

So yeah, it definitely needs some helper classes to be easier to use. :-P Right now it’s pretty much just raw record/tag classes. The resulting SWF file is located here.

Pwiff @ Google Code
Pwiff @ Ohloh

This entry was posted in PHP and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>