<?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>Shide and Prame &#187; Rant</title>
	<atom:link href="http://aidan.rfm.co.nz/blog/tag/rant/feed/" rel="self" type="application/rss+xml" />
	<link>http://aidan.rfm.co.nz/blog</link>
	<description>Aidan&#039;s digital life</description>
	<lastBuildDate>Fri, 21 May 2010 01:45:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>onReleaseOutside for AS3</title>
		<link>http://aidan.rfm.co.nz/blog/2010/03/onreleaseoutside-for-as3/</link>
		<comments>http://aidan.rfm.co.nz/blog/2010/03/onreleaseoutside-for-as3/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 22:32:08 +0000</pubDate>
		<dc:creator>aidan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash and ActionScript]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[Shortcuts and Timesavers]]></category>

		<guid isPermaLink="false">http://aidan.rfm.co.nz/blog/?p=119</guid>
		<description><![CDATA[Recently I was horrified to learn that there is no AS3 equivalent for the AS2 event &#8220;onReleaseOutside&#8221;. I consider to be an extremely useful and important event. Although it can be emulated faithfully with the provided mouse events and a complicated bunch of calls to add/removeEventListener, it&#8217;s something you have to implement again and again. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was horrified to learn that there is no AS3 equivalent for the AS2 event &#8220;onReleaseOutside&#8221;. I consider to be an extremely useful and important event. Although it can be emulated faithfully with the provided mouse events and a complicated bunch of calls to add/removeEventListener, it&#8217;s something you have to implement again and again. Because I was too lazy, I&#8217;ve been grumbling, sighing, and copy-pasting code without much more thought.</p>
<p>But as it turns out, I don&#8217;t have to anymore because Tyler of xtyler.com has released a super-groovy as3 library for <a title="AS3 Button Behavior Made Easy" href="http://www.xtyler.com/code/112/">making any InteractiveObject behave as a button</a>.</p>
<p>Siic! [sic]</p>
]]></content:encoded>
			<wfw:commentRss>http://aidan.rfm.co.nz/blog/2010/03/onreleaseoutside-for-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saving time when dynamically constructing BitmapData subclasses created in Flash</title>
		<link>http://aidan.rfm.co.nz/blog/2010/02/saving-time-when-dynamically-constructing-bitmapdata-subclasses-created-in-flash/</link>
		<comments>http://aidan.rfm.co.nz/blog/2010/02/saving-time-when-dynamically-constructing-bitmapdata-subclasses-created-in-flash/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 00:24:22 +0000</pubDate>
		<dc:creator>aidan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash and ActionScript]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://aidan.rfm.co.nz/blog/2010/02/saving-time-when-dynamically-constructing-bitmapdata-subclasses-created-in-flash/</guid>
		<description><![CDATA[When dynamically constructing embedded bitmaps which have been defined in the Flash Studio, it turns out that you don't actually need to pass the constructor the correct width and height, which can save heaps of time.]]></description>
			<content:encoded><![CDATA[<p>When constructing custom <code>BitmapData</code> subclasses which have been defined in the Flash Studio (such as <code>MyFancyBitmapData</code>), it turns out that you don&#8217;t actually need to pass the correct width and height of the bitmap. The <code>MyFancyBitmapData</code> class completely ignores its two (required) constructor parameters, and uses hard coded ones.</p>
<p>So don&#8217;t bother meticulously violating <acronym title="Don't Repeat Yourself">DRY</acronym> principles when creating these things dynamically. You can pass any integers you like, including zero or negative one, but I particularly like using <code>NaN</code> because it makes it clear that you&#8217;re not even trying to supply a number that could possibly be interpreted in any meaningful way (even if that&#8217;s a tad passive aggressive&#8230;)</p>
<pre>// e.g.
var myBitmapData:BitmapData = new MyFancyBitmap(NaN,NaN);
trace(myBitmapData.width + ", " + myBitmapData.height); // outputs: 45, 45</pre>
<p>It seems a bit ugly to me that the generated <code>BitmapData</code> subclasses require their parameters. I really do think they should be optional at the very least, and ideally, illegal.</p>
<p>Hope this saves someone some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://aidan.rfm.co.nz/blog/2010/02/saving-time-when-dynamically-constructing-bitmapdata-subclasses-created-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
