<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steve&#039;s Blog &#187; pwiff</title>
	<atom:link href="http://crindigo.com/blog/tag/pwiff/feed/" rel="self" type="application/rss+xml" />
	<link>http://crindigo.com/blog</link>
	<description>Escapades of a web programmer</description>
	<lastBuildDate>Thu, 24 Jun 2010 00:33:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Pwiff Update</title>
		<link>http://crindigo.com/blog/2010/02/pwiff-update/</link>
		<comments>http://crindigo.com/blog/2010/02/pwiff-update/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 05:36:36 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[pwiff]]></category>

		<guid isPermaLink="false">http://crindigo.com/blog/?p=69</guid>
		<description><![CDATA[I just committed a simple Movie and Encoder class, so making a blank movie is now far easier to understand. At least now you don&#8217;t have to calculate the file length by hand. $env = new Pwiff_Environment; $env-&#62;setSwfVersion(10); $movie = &#8230; <a href="http://crindigo.com/blog/2010/02/pwiff-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just committed a simple Movie and Encoder class, so making a blank movie is now far easier to understand. At least now you don&#8217;t have to calculate the file length by hand. <img src='http://crindigo.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<pre class="brush: php;">
$env = new Pwiff_Environment;
$env-&gt;setSwfVersion(10);

$movie = new Pwiff_Movie($env);
$movie-&gt;setFrameSize(100, 100);
$movie-&gt;setFrameRate(0);

$enc = new Pwiff_Encoder($movie, new Pwiff_Output_File('test.swf'));
$enc-&gt;encode();
</pre>
<p>The first step is to define an environment, which creates a context for encoding (and later decoding). By setting the version, certain tags or tag attributes could be ignored when reading or writing, if they are in a higher version than what you set. Then, you define a movie object, and set some of its properties, like the frame size and frame rate. After that, you would do more fancy things (when they get written, though you can addTag() with it right now). Finally, set up an encoder, passing the movie and output objects, and call encode(), which will write it with the given output instance (in this case, to the file test.swf).</p>
]]></content:encoded>
			<wfw:commentRss>http://crindigo.com/blog/2010/02/pwiff-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pwiff Source Released</title>
		<link>http://crindigo.com/blog/2010/02/pwiff-source-released/</link>
		<comments>http://crindigo.com/blog/2010/02/pwiff-source-released/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 04:28:05 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[pwiff]]></category>

		<guid isPermaLink="false">http://crindigo.com/blog/?p=66</guid>
		<description><![CDATA[Today, I was able to get Pwiff to create a &#8220;blank&#8221; 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 &#8230; <a href="http://crindigo.com/blog/2010/02/pwiff-source-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today, I was able to get Pwiff to create a &#8220;blank&#8221; 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&#8217;s very bare bones right now, as you can see from the following example that created the 25-byte file:</p>
<pre class="brush: php;">
$env = new Pwiff_Environment;
$env-&gt;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-&gt;write($out);
$f-&gt;write($out);
$e-&gt;write($out);
</pre>
<p>So yeah, it definitely needs some helper classes to be easier to use. <img src='http://crindigo.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' />  Right now it&#8217;s pretty much just raw record/tag classes. The resulting SWF file is located <a href="/stuff/test.swf">here</a>.</p>
<p><a href="http://code.google.com/p/pwiff/">Pwiff @ Google Code</a><br />
<a href="http://ohloh.net/p/pwiff">Pwiff @ Ohloh</a></p>
]]></content:encoded>
			<wfw:commentRss>http://crindigo.com/blog/2010/02/pwiff-source-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Pwiff</title>
		<link>http://crindigo.com/blog/2010/02/introducing-pwiff/</link>
		<comments>http://crindigo.com/blog/2010/02/introducing-pwiff/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 05:36:32 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[pwiff]]></category>

		<guid isPermaLink="false">http://crindigo.com/blog/?p=59</guid>
		<description><![CDATA[Considering I&#8217;ve reached a small milestone in the project, I figured I would write a post explaining what I&#8217;ve been up to. My previous entry relates to this, as at the time I was experimenting with writing a class to &#8230; <a href="http://crindigo.com/blog/2010/02/introducing-pwiff/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Considering I&#8217;ve reached a small milestone in the project, I figured I would write a post explaining what I&#8217;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.</p>
<p>If the name of the project didn&#8217;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 &#8211; SWF is pronounced <i>swiff</i>, so I put a P in there for PHP <img src='http://crindigo.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> . The last project which attempted this, <a href="http://sf.net/projects/freemovie/">FreeMovie</a>, 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.</p>
<p>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.</p>
<p>Until next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://crindigo.com/blog/2010/02/introducing-pwiff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
