<?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>Chaos Garden &#187; Flash Games</title>
	<atom:link href="http://www.chaoseed.com/garden/category/flash-games/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chaoseed.com/garden</link>
	<description>Explorations into game design and creativity</description>
	<lastBuildDate>Thu, 15 Jul 2010 22:52:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>AS3 and images part 2</title>
		<link>http://www.chaoseed.com/garden/2009/04/15/as3-and-images-part-2/</link>
		<comments>http://www.chaoseed.com/garden/2009/04/15/as3-and-images-part-2/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 05:16:43 +0000</pubDate>
		<dc:creator>JohnEvans</dc:creator>
				<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.chaoseed.com/garden/?p=34</guid>
		<description><![CDATA[Previously I talked about using images in AS3. Now I&#8217;ve figured out a further enhancement to the procedure I described. In that previous article I talked about adding an image to the library and instantiating it as a BitmapData object.  Then I talked about creating a Bitmap object, but there&#8217;s a problem; in the AS3 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Chaos Garden: AS3 and images; Aching Dreams" href="http://www.chaoseed.com/garden/?p=30">Previously I talked about using images in AS3.</a> Now I&#8217;ve figured out a further enhancement to the procedure I described.</p>
<p>In that previous article I talked about adding an image to the library and instantiating it as a BitmapData object.  Then I talked about creating a Bitmap object, but there&#8217;s a problem; in the AS3 reference, on the Bitmap page, there&#8217;s this nugget of information:</p>
<blockquote><p><strong>Note:</strong> The Bitmap class is not a subclass of the InteractiveObject class, so  it cannot dispatch mouse events. However, you can use the <code>addEventListener()</code> method  of the display object container that contains the Bitmap object.</p></blockquote>
<p>This makes it impossible to turn a Bitmap into, say, a button.  However, there is hope!</p>
<p>Instead of making a Bitmap object, make a Sprite object.  Then fill the Sprite&#8217;s graphics member with the bitmap.  Specifically, use the beginBitmapFill(), drawRect() and endFill functions.  Here&#8217;s some basic code to get you started:</p>
<p><code>var t_IconClass:Class = getDefinitionByName("picture0.png") as Class;<br />
var t_BitmapData:BitmapData = new t_IconClass(0, 0);<br />
var t_Sprite:Sprite = new Sprite();<br />
t_Sprite.x = 64;  // Position it wherever you want<br />
t_Sprite.y = 128;<br />
t_Sprite.graphics.beginBitmapFill(t_BitmapData);<br />
t_Sprite.graphics.drawRect(0, 0, t_BitmapData.width, t_BitmapData.height);<br />
t_Sprite.graphics.endFill();<br />
t_Sprite.addEventListener(MouseEvent.MOUSE_DOWN, SpriteClickFunc);<br />
addChild(t_Sprite);<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chaoseed.com/garden/2009/04/15/as3-and-images-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AS3 and images; Aching Dreams 2</title>
		<link>http://www.chaoseed.com/garden/2008/12/14/30/</link>
		<comments>http://www.chaoseed.com/garden/2008/12/14/30/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 02:15:29 +0000</pubDate>
		<dc:creator>JohnEvans</dc:creator>
				<category><![CDATA[Adult Games]]></category>
		<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[aching dreams]]></category>
		<category><![CDATA[aching dreams 2]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adult]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.chaoseed.com/garden/?p=30</guid>
		<description><![CDATA[I upgraded to Flash CS4, and I&#8217;ve been working on Aching Dreams 2, as well as simply learning ActionScript 3.0. So far I&#8217;m just working on the programming framework; the story, gameplay and characters are still being, ah, fleshed out. Here&#8217;s something interesting I&#8217;ve discovered: When you add an image to a Flash file in [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded to Flash CS4, and I&#8217;ve been working on Aching Dreams 2, as well as simply learning ActionScript 3.0.  So far I&#8217;m just working on the programming framework; the story, gameplay and characters are still being, ah, <em>fleshed out</em>.</p>
<p>Here&#8217;s something interesting I&#8217;ve discovered:</p>
<p>When you add an image to a Flash file in the library, it becomes an &#8220;embedded asset&#8221;.  In AS3, you can use the getDefinitionByName() function to find the embedded asset class based on its filename (well, its linkage name, which is by default its filename).  Then you can instantiate the class and get a BitmapData class; you can use this to construct a Bitmap class, then use addChild or addChildAt to display it.  The really interesting thing is that the documentation says the BitmapData constructor takes a height and width&#8230;<strong>but</strong> this doesn&#8217;t seem to matter in the case of embedded assets.  Pass the constructor anything you want, even 0,0, and it should still instantiate and display correctly.</p>
<p><strong>EDIT</strong>: <a href="http://www.chaoseed.com/garden/?p=34">The followup post has more about this and a better way to pull it off.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chaoseed.com/garden/2008/12/14/30/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A review and a new project!</title>
		<link>http://www.chaoseed.com/garden/2008/11/06/a-review-and-a-new-project/</link>
		<comments>http://www.chaoseed.com/garden/2008/11/06/a-review-and-a-new-project/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 06:21:23 +0000</pubDate>
		<dc:creator>JohnEvans</dc:creator>
				<category><![CDATA[Adult Games]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Flash Games]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[aching dreams]]></category>
		<category><![CDATA[adult]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[halloween]]></category>
		<category><![CDATA[inform]]></category>
		<category><![CDATA[Interactive Fiction]]></category>
		<category><![CDATA[tigsource]]></category>

		<guid isPermaLink="false">http://www.chaoseed.com/garden/?p=26</guid>
		<description><![CDATA[First, Greg Costikyan (yes, that Greg Costikyan) has given Aching Dreams a favorable review.  Not intense praise or accolades by any means, but for what the game is, I&#8217;m very pleased with what he said.  And there&#8217;s an interesting conversation going on in the comments, too.  Really, this is kind of an amazing feeling for [...]]]></description>
			<content:encoded><![CDATA[<p>First, <a title="Aching Dreams review at Play This Thing" href="http://playthisthing.com/aching-dreams-hentai-date-sim">Greg Costikyan (yes, that Greg Costikyan) has given Aching Dreams a favorable review</a>.  Not intense praise or accolades by any means, but for what the game is, I&#8217;m very pleased with what he said.  And there&#8217;s an interesting conversation going on in the comments, too.  Really, this is kind of an amazing feeling for me; obviously Cook did a lot of work on the project (more than just art), but I&#8217;m the one who had responsibility for programming, UI design, fixing bugs, not to mention building and &#8220;shipping&#8221; the finished product.  So I feel rather&#8230;validated!</p>
<p>Also, I&#8217;ve started on <a title="The Duel (TIGSource Forums)" href="http://forums.tigsource.com/index.php?topic=3559.0">an interactive fiction game called &#8220;The Duel&#8221;</a> for TIGSource&#8217;s Commonplace Book Competition (horror-themed for the Halloween season!).  Check it out and make suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chaoseed.com/garden/2008/11/06/a-review-and-a-new-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
