<?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>xerode.id &#187; Flash</title>
	<atom:link href="http://www.xerode.net/blog/category/portfolio/flash-portfolio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xerode.net/blog</link>
	<description>The blog and portfolio of Paul Bennett, a 26 year old Flash developer and occasional photographer</description>
	<lastBuildDate>Sat, 04 Sep 2010 12:04:49 +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>Play with my balls</title>
		<link>http://www.xerode.net/blog/2009/02/15/play-with-my-balls/</link>
		<comments>http://www.xerode.net/blog/2009/02/15/play-with-my-balls/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 22:13:24 +0000</pubDate>
		<dc:creator>xerode</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[balls]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://www.xerode.net/blog/?p=400</guid>
		<description><![CDATA[Some simple physics-based animation with an unnecessary double entendre]]></description>
			<content:encoded><![CDATA[<p>Recently I had to a test as part of an application for a job as a Flash developer at a London digital agency. Here&#8217;s the brief:</p>
<blockquote>
<p>Have three balls bouncing around the screen.</p>
<ul>
<li>There must be gravity</li>
<li>The balls should bounce off the sides of the screen and back in</li>
<li>The balls should bounce off each other</li>
</ul>
</blockquote>
<p>I&#8217;ve yet to hear back from them, so I decided to do a little bit more tweaking and post it up here. The different types of balls have slightly different properties such as bounciness, mass and size.</p>
<div class="aCenter">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_balls_1030598711"
			class="flashmovie"
			width="400"
			height="400">
	<param name="movie" value="/flash/experiments/physics/balls.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/experiments/physics/balls.swf"
			name="fm_balls_1030598711"
			width="400"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p>There&#8217;s some basic interactivity, allowing the balls to be picked up and dropped. This can cause a few problems when a ball is dropped in a position that intersects another ball, so I&#8217;ve still got a little bit bug-fixing to do but overall I&#8217;m happy with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xerode.net/blog/2009/02/15/play-with-my-balls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A happy accident in Flash</title>
		<link>http://www.xerode.net/blog/2009/02/02/a-happy-accident-in-flash/</link>
		<comments>http://www.xerode.net/blog/2009/02/02/a-happy-accident-in-flash/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 21:48:11 +0000</pubDate>
		<dc:creator>xerode</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[particles]]></category>

		<guid isPermaLink="false">http://www.xerode.net/blog/?p=389</guid>
		<description><![CDATA[Move the mouse to the centre of the Flash movie and then move it around. That's about it.]]></description>
			<content:encoded><![CDATA[<p>This is the first happy accident I&#8217;ve had in Flash in a while. I was messing about with more bitmap stuff, trying to mimic basic &#8220;fire&#8221; particle effects found in music visualisation apps. Originally the idea was to have the effect based on the mouse position from the centre of the movie. I messed up the scripting and now the x and y scale of the effect is based on the x and y position of the mouse.</p>
<div class="aCenter">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_blurblend_1851474582"
			class="flashmovie"
			width="600"
			height="600">
	<param name="movie" value="/flash/experiments/particles/blurblend.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/experiments/particles/blurblend.swf"
			name="fm_blurblend_1851474582"
			width="600"
			height="600">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<h2>Instructions</h2>
<p>Move the mouse to the centre of the Flash movie and then move it around. That&#8217;s about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xerode.net/blog/2009/02/02/a-happy-accident-in-flash/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Yet another flag post</title>
		<link>http://www.xerode.net/blog/2009/01/18/yet-another-flag-post/</link>
		<comments>http://www.xerode.net/blog/2009/01/18/yet-another-flag-post/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 16:07:03 +0000</pubDate>
		<dc:creator>xerode</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[particles]]></category>
		<category><![CDATA[Starship Troopers]]></category>

		<guid isPermaLink="false">http://www.xerode.net/blog/?p=347</guid>
		<description><![CDATA[I'm not obsessed with flags, I swear]]></description>
			<content:encoded><![CDATA[<p>This will be the last post about flags, I swear. I&#8217;m not obsessed with them. I&#8217;ve been <a href="http://www.xerode.net/flash/experiments/particles/pspray.html">playing with particles</a> recently, looking at the different ways of drawing to the screen as they all have pros and cons in terms of speed, quality and control. I updated the flag code to use draw( ) instead of merge( ) and used some blend modes to improve the shading. On my 3 year old desktop it runs at roughly the same rate as the previous version but I think it looks an awful lot better.</p>
<div class="aCenter">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_perlin2_2073907744"
			class="flashmovie"
			width="450"
			height="270">
	<param name="movie" value="/flash/experiments/flag/perlin2.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/experiments/flag/perlin2.swf"
			name="fm_perlin2_2073907744"
			width="450"
			height="270">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p>It&#8217;s scrappily written but if you want the source code it&#8217;s available on the next page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xerode.net/blog/2009/01/18/yet-another-flag-post/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A better flag ripple using Perlin noise</title>
		<link>http://www.xerode.net/blog/2008/11/28/a-better-flag-ripple-using-perlin-noise/</link>
		<comments>http://www.xerode.net/blog/2008/11/28/a-better-flag-ripple-using-perlin-noise/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 19:15:19 +0000</pubDate>
		<dc:creator>xerode</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[Perlin noise]]></category>
		<category><![CDATA[Starship Troopers]]></category>

		<guid isPermaLink="false">http://www.xerode.net/blog/?p=342</guid>
		<description><![CDATA[More experimenting with BitmapData to improve on a previous idea]]></description>
			<content:encoded><![CDATA[<p>Since my last post on <a href="http://www.xerode.net/blog/2008/11/18/flag-effect-using-bitmapdata-in-actionscript/">animating a flag using ActionScript</a>, I&#8217;ve been looking at how to improve the effect. The answer? Scrap my initial idea and use some of Flash&#8217;s classes.</p>
<div class="aCenter">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_perlin_2074498394"
			class="flashmovie"
			width="450"
			height="270">
	<param name="movie" value="/flash/experiments/flag/perlin.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/experiments/flag/perlin.swf"
			name="fm_perlin_2074498394"
			width="450"
			height="270">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p>I used BitmapData&#8217;s <a href="http://en.wikipedia.org/wiki/Perlin_noise">perlinNoise</a> function to generate a grayscale image and played with the values until I found something useful. This image was merged with the flag to provide shading and then used as a displacement map for a DisplacementMapFilter applied to the shaded flag.</p>
<p>The effect was animated by changing the offsets of the Perlin noise, constantly increasing the x offset to provide the scrolling while using Sine waves on the y offset to simulate turbulence. Sine waves were also used to modulate the DisplacementMapFilter&#8217;s x and y displacement values to make the animation less uniform. The frame was then merged with the previous frame, to slightly soften the output.</p>
<p>I&#8217;m more satisfied with this result than my original attempt &#8211; it&#8217;s higher quality and renders faster. Although I pretty much had to disregard my previous work and it&#8217;s still a pretty useless effect, I&#8217;ve learnt more about some classes that&#8217;ll be useful when I come to look at particles and sprite rendering in games.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xerode.net/blog/2008/11/28/a-better-flag-ripple-using-perlin-noise/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flag ripple effect using BitmapData</title>
		<link>http://www.xerode.net/blog/2008/11/18/flag-effect-using-bitmapdata-in-actionscript/</link>
		<comments>http://www.xerode.net/blog/2008/11/18/flag-effect-using-bitmapdata-in-actionscript/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 12:52:36 +0000</pubDate>
		<dc:creator>xerode</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[Starship Troopers]]></category>

		<guid isPermaLink="false">http://www.xerode.net/blog/?p=332</guid>
		<description><![CDATA[I wanted to replicate some of the effects seen in 8 and 16-bit video games, where sprites would be distorted to represent fire or water effects during battles in Pokémon or other RPGs]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking at ActionScript&#8217;s Bitmap and BitmapData classes a bit recently as they&#8217;re one area of Flash I&#8217;ve yet to really play around with. <a href="http://www.xerode.net/blog/2008/10/14/space-invader-tiles-in-papervision3d/">I&#8217;ve read from bitmaps before</a> but hadn&#8217;t tried writing to them and as this is a useful technique for visual effects and games, I started looking at it over the weekend.</p>
<p>I wanted to replicate some of the effects seen in 8 and 16-bit video games, where sprites would be distorted to represent fire or water effects during battles in Pokémon or other RPGs. I figured that the simplest way would be to use sine waves to repositon rows or columns of pixels. Add a little animation and I came up with a basic flag ripple effect.</p>
<div class="aCenter">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_flag_289017122"
			class="flashmovie"
			width="300"
			height="200">
	<param name="movie" value="/flash/experiments/flag/flag.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/experiments/flag/flag.swf"
			name="fm_flag_289017122"
			width="300"
			height="200">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></div>
<p>It&#8217;s a very rough and ready script and the output isn&#8217;t realistic but I&#8217;m going to look at using dynamic gradients and masking or the DisplacementMapFilter class to improve it. With the advent of Flash 10&#8217;s Pixel Bender Filters I&#8217;m guessing that scripting this kind of effect may become obsolete but as a means of teaching myself about writing BitmapData it&#8217;s pretty effective.</p>
<p>In case you&#8217;re wondering, the Flash movie above is an imitation of some of the fake advertising in the <em>Starship Troopers</em> series, using <a href="http://www.flickr.com/photos/xerode/2411915778/in/set-72157604508192493/">one of my photos from an Anonymous protest</a>.</p>
<div class="aCenter"><img src="http://www.xerode.net/images/blog/2008/11/18/starshiptroopers.jpg" width="300" height="220" alt="Join the fight!" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.xerode.net/blog/2008/11/18/flag-effect-using-bitmapdata-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Space Invader tiles in Papervision3D</title>
		<link>http://www.xerode.net/blog/2008/10/14/space-invader-tiles-in-papervision3d/</link>
		<comments>http://www.xerode.net/blog/2008/10/14/space-invader-tiles-in-papervision3d/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 13:11:08 +0000</pubDate>
		<dc:creator>xerode</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Laboratory]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Tweener]]></category>

		<guid isPermaLink="false">http://www.xerode.net/blog/?p=154</guid>
		<description><![CDATA[A little Flash movie I threw together while experimenting with primitives and mouse-based camera controls in Papervision3D]]></description>
			<content:encoded><![CDATA[
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_invader_1590860333"
			class="flashmovie"
			width="500"
			height="375">
	<param name="movie" value="/flash/experiments/invader/invader.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/flash/experiments/invader/invader.swf"
			name="fm_invader_1590860333"
			width="500"
			height="375">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>A little Flash movie I threw together while experimenting with primitives and mouse-based camera controls in <a href="http://code.google.com/p/papervision3d/">Papervision3D</a>. I was also playing about with <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BitmapData.html">BitmapData</a> &#8211; all the data is loaded from this image:</p>
<p><img src="http://www.xerode.net/flash/experiments/invader/gfx/spaceinvader.png" width="26" height="20" alt="Space Invader" /></p>
<p>The whole thing took about an hour to put together and then around 30 minutes of playing with the animation in <a href="http://code.google.com/p/tweener/">Tweener</a>. This movie is my second experiment in Papervision3D and is a few months old now &#8211; I&#8217;ll be uploading some of my works that haven&#8217;t seen the light of day before as I finish off the design and flesh the content of this blog out slightly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xerode.net/blog/2008/10/14/space-invader-tiles-in-papervision3d/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
