<?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>Soulwire &#187; Flash Player 10</title>
	<atom:link href="http://blog.soulwire.co.uk/tag/flash-player-10/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.soulwire.co.uk</link>
	<description>Art + Technology</description>
	<lastBuildDate>Mon, 21 Mar 2011 22:27:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>AS3 Particle Node Sequencer</title>
		<link>http://blog.soulwire.co.uk/laboratory/flash/as3-tonfall-particle-node-sequencer</link>
		<comments>http://blog.soulwire.co.uk/laboratory/flash/as3-tonfall-particle-node-sequencer#comments</comments>
		<pubDate>Sat, 09 Oct 2010 12:31:40 +0000</pubDate>
		<dc:creator>Soulwire</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Generative]]></category>
		<category><![CDATA[Lab]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Autonomous]]></category>
		<category><![CDATA[Biology]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Visualisation]]></category>

		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=1177</guid>
		<description><![CDATA[An experimental particle based audio sequencer, created in Flash using Tonfall; the new open source AS3 audio engine produced by Andre Michelle


Related posts:<ol><li><a href='http://blog.soulwire.co.uk/laboratory/flash/as3-flocking-steering-behaviors' rel='bookmark' title='Permanent Link: Flipping you the Boid'>Flipping you the Boid</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/recursive-polygon-subdivision' rel='bookmark' title='Permanent Link: Recursive Polygon Subdivision'>Recursive Polygon Subdivision</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/2d-cellular-automata' rel='bookmark' title='Permanent Link: 2D Cellular Automata'>2D Cellular Automata</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.soulwire.co.uk/wp-content/uploads/2010/10/tonfall-sequencer.swf" rel="lightbox;width=900;height=620;" ><img src="http://blog.soulwire.co.uk/wp-content/uploads/2010/10/tonfall-sequencer.jpg" alt="Tonfall Sequencer" title="Tonfall Sequencer"/></a></p>
<p>(You can <strong>drag</strong> each node and switch off the <em>wander</em> behaviour to create your own compositions).</p>
<p>At <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://flashonthebeach.com/"  target="_blank">Flash on the Beach</a> this year, I had the privilege of seeing <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.andre-michelle.com/"  target="_blank">Andre Michelle</a> speak. It was great to hear him explain some of his fantastic work behind <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.audiotool.com/"  target="_blank">audiotool</a> and to see and hear some more of his audio experiments.<span id="more-1177"></span></p>
<p>He also introduced <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://code.google.com/p/tonfall/"  target="_blank">Tonfall</a>, which is an open source AS3 framework designed to get people started with Audio programming in Flash. From the horses mouth; &#8220;Tonfall introduces only a vague design of an audio engine and is rather focussed on readability and simplicity than performance optimizations&#8221;.</p>
<p>I know that I&#8217;m not alone in feeling inspired by what Andre has done for the Flash platform, particularly when it comes to audio, yet lack the knowledge he has invested so much time and hard work in acquiring. The fact that he&#8217;s now sharing it with the ret of us for free was more than enough impetus to have a crack at it myself.</p>
<p>So this is my first test with the framework, which although not extensively documented (at the time of writing), was quite easy to pick up and get going with.</p>
<p>This <a href="http://blog.soulwire.co.uk/wp-content/uploads/2010/10/synthesiser.swf" rel="lightbox;width=900;height=650;" >sequencer</a> is based around physical nodes, which connect to produce a variety of tones. There are two types of node, a <em>neuron</em> and a <em>receptor</em>, which are connected by <em>synapses</em> (apologies for the trite analogies). Neurons fire periodically, and if within a certain proximity of a receptor, this message is sent at a fixed speed along the bridging synapse. When the message arrives, the receptor is activated and responds by queuing it&#8217;s individual tone within the audio engine. Each receptor owns a randomly assigned note, and each neuron a randomly assigned octave; therefor a receptor will play it&#8217;s note in several different octaves depending on which neuron causes it to fire.</p>
<p>The download includes the builds of <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://code.google.com/p/tonfall/"  target="_blank">Tonfall</a> by Andre Michelle and <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.minimalcomps.com/"  target="_blank">Minimal Comps</a> by Keith Peters that I&#8217;m using.</p>
<a href="http://blog.soulwire.co.uk/wp-content/plugins/download-monitor/download.php?id=ParticleSequencer.zip" class="download" title="Particle Sequencer: AS3 Particle Audio Sequencer built with Tonfall Audio Engine"  rel="nofollow"><strong>Download:</strong> Particle Sequencer</a>


<p>Related posts:<ol><li><a href='http://blog.soulwire.co.uk/laboratory/flash/as3-flocking-steering-behaviors' rel='bookmark' title='Permanent Link: Flipping you the Boid'>Flipping you the Boid</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/recursive-polygon-subdivision' rel='bookmark' title='Permanent Link: Recursive Polygon Subdivision'>Recursive Polygon Subdivision</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/2d-cellular-automata' rel='bookmark' title='Permanent Link: 2D Cellular Automata'>2D Cellular Automata</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.soulwire.co.uk/laboratory/flash/as3-tonfall-particle-node-sequencer/feed</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Technical Tentacles</title>
		<link>http://blog.soulwire.co.uk/laboratory/flash/pixel-bender-growing-tentacles</link>
		<comments>http://blog.soulwire.co.uk/laboratory/flash/pixel-bender-growing-tentacles#comments</comments>
		<pubDate>Tue, 26 May 2009 19:08:17 +0000</pubDate>
		<dc:creator>Soulwire</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Generative]]></category>
		<category><![CDATA[Lab]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[Pixel Bender]]></category>

		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=360</guid>
		<description><![CDATA[I’ve been revisiting one of my favourite topics lately &#8211; recursion &#8211; and have been getting together a bunch of sketches for a big personal project I’m working on (more on that another time). Anyway, I inadvertently stumbled across quite a nice way of making things grow in a convincing manner, and whilst this script [...]


Related posts:<ol><li><a href='http://blog.soulwire.co.uk/laboratory/flash/as3-tonfall-particle-node-sequencer' rel='bookmark' title='Permanent Link: AS3 Particle Node Sequencer'>AS3 Particle Node Sequencer</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/recursive-polygon-subdivision' rel='bookmark' title='Permanent Link: Recursive Polygon Subdivision'>Recursive Polygon Subdivision</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/perlin-noise-flow-field' rel='bookmark' title='Permanent Link: Perlin Noise Flow Field'>Perlin Noise Flow Field</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.soulwire.co.uk/wp-content/uploads/2009/05/tenticles.swf" rel="lightbox;width=900;height=760" title="Pixel Bender Generative Tentacles" ><img src="http://blog.soulwire.co.uk/wp-content/uploads/2009/05/tentacles-cropped-710x326.jpg" alt="Generative Tentacles" title="Generative Tentacles" width="710" height="326" class="alignnone size-medium wp-image-509" /></a></p>
<p>I’ve been revisiting one of my favourite topics lately &#8211; <strong><a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://en.wikipedia.org/wiki/Recursion"  target="_blank">recursion</a></strong> &#8211; and have been getting together a bunch of sketches for a big personal project I’m working on <em>(more on that another time)</em>. Anyway, I inadvertently stumbled across quite a nice way of making things grow in a convincing manner, and whilst this script doesn’t actually use recursion ‘per se’, I thought it was kind of cool so I ran with it.<span id="more-360"></span></p>
<p>It also presented a good opportunity to try out another Flash Player 10 feature that I’ve been eager to try, which is using <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://labs.adobe.com/technologies/pixelbender/"  target="_blank"><strong>Pixel Bender</strong></a> and <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://livedocs.adobe.com/flex/3/langref/flash/display/ShaderJob.html"  target="_blank"><strong>ShaderJob</strong></a>. Although I’ve used Pixel Bender before, I’ve never used it in this way.</p>
<p>Basically, the idea is to exploit Pixel Bender’s performance and ask it to do some of the heavier number crunching for you &#8211; a concept that is currently being used by the Papervision3D team to give some juice to the next release. The other great thing about this approach is that these computations can run in another thread, leaving you more resources for other tasks (like rendering a fishing boat load of tentacles)</p>
<p>So, although this isn’t the best example of using Pixel Bender’s capabilities, it was a nice opportunity to exercise the idea. Each Tentacle starts a new ShaderJob and Pixel Bender whips up some tasty trigonometry for me, before passing it back inside a <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://livedocs.adobe.com/flex/3/langref/Vector.html"  target="_blank">Vector</a> object (typed Array). From there it’s just a question of making those numbers look nice&#8230; Kind of reminds me of the illustrative style used for the <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://oreilly.com/"  target="_blank">O&#8217;Reilly</a> book covers&#8230;</p>


<p>Related posts:<ol><li><a href='http://blog.soulwire.co.uk/laboratory/flash/as3-tonfall-particle-node-sequencer' rel='bookmark' title='Permanent Link: AS3 Particle Node Sequencer'>AS3 Particle Node Sequencer</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/recursive-polygon-subdivision' rel='bookmark' title='Permanent Link: Recursive Polygon Subdivision'>Recursive Polygon Subdivision</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/perlin-noise-flow-field' rel='bookmark' title='Permanent Link: Perlin Noise Flow Field'>Perlin Noise Flow Field</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.soulwire.co.uk/laboratory/flash/pixel-bender-growing-tentacles/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Double Sided 3D Plane in FP10</title>
		<link>http://blog.soulwire.co.uk/code/open-source/two-sided-planes-in-flash-player-10</link>
		<comments>http://blog.soulwire.co.uk/code/open-source/two-sided-planes-in-flash-player-10#comments</comments>
		<pubDate>Tue, 30 Dec 2008 14:15:10 +0000</pubDate>
		<dc:creator>Soulwire</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Lab]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash Player 10]]></category>

		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=273</guid>
		<description><![CDATA[Easily create two sided 3D DisplayObjects and flip card effects using Flash Player 10 and the new 3D API


Related posts:<ol><li><a href='http://blog.soulwire.co.uk/code/actionscript-3/fit-a-displayobject-into-a-rectangle' rel='bookmark' title='Permanent Link: Fit DisplayObject into Rectangle'>Fit DisplayObject into Rectangle</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/as3-flocking-steering-behaviors' rel='bookmark' title='Permanent Link: Flipping you the Boid'>Flipping you the Boid</a></li>
<li><a href='http://blog.soulwire.co.uk/code/actionscript-3/managing-runtime-loaded-dynamic-assets' rel='bookmark' title='Permanent Link: Hello Dynamic Sprite'>Hello Dynamic Sprite</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.soulwire.co.uk/wp-content/uploads/2008/12/papersprite.swf" rel="lightbox;width=800;height=550;" title="Double Sided DisplayObject in Flash Player 10" ><img title="PaperSprite Demo" src="http://blog.soulwire.co.uk/wp-content/uploads/2008/12/papersprite-710x352.jpg" alt="PaperSprite Demo" width="710" height="352" /></a></p>
<p>I’ve made a couple of small improvements to the PaperSprite class:</p>
<ol>
<li>The visible face of the plane is updated automatically only when required. This saves on processing load and also means you can just set up the PaperSprite and not have to worry about anything else, just tween the crap out of all its properties and it won’t mind one bit. (Thanks to Jesse for the pointers re. using stage.invalidate for this process)</li>
<li>The back face is now automatically flipped horizontally, so text and graphics are no longer mirrored and will display correctly</li>
<li>I’ve changed the logic which sets the dynamic registration point for the pivot. This should now correctly line up the front and back faces of the 3D plane, regardless of where their individual registration points are.</li>
</ol>
<p>Also, some people have asked how to use it, so here is a really quick example to get you up and running with PaperSprite if you are not familiar with using classes and are using the Flash IDE to compile your movie:</p>
<ol>
<li>First, <a href="http://blog.soulwire.co.uk/wp-content/plugins/download-monitor/download.php?id=papersprite.zip" title="Download the PaperSprite class for creating two sided planes using FP10" >download the PaperSprite class</a> and put the <strong>soulwire </strong>folder in the same directory as your FLA or source code.</li>
<li>Then paste this code into the main timeline of your FLA:</li>
</ol>
<p><span id="more-273"></span></p>
<pre lang="actionscript">// Import the PaperSprite class

import soulwire.display.PaperSprite;

/*
Create a new PaperSprite:

If your front and back faces already exist, you can pass them straight
into the constructor, like so:

myPaperSprite = new PaperSprite( myFrontMc, myBackMc );
*/

var myPaperSprite:PaperSprite = new PaperSprite();

/*
Optionally specify a pivot point, in this example the centre is used
(this is also the default so there is no need to set this normally).

To pivot around the top left use:
myPaperSprite.pivot = new Point(0,0);

or for bottom right:
myPaperSprite.pivot = new Point(1,1);

and so on...
*/

myPaperSprite.pivot = new Point(0.5,0.5);

// Centre it on the stage

myPaperSprite.x = stage.stageWidth / 2;
myPaperSprite.y = stage.stageHeight / 2;

/*
Set the front and back faces:

These can be any type of DisplayObject, for example, to use a MovieClip
from your library use:

myPaperSprite.front = new MyLibraryClip();
*/

myPaperSprite.front = createSprite(0x66FF00);
myPaperSprite.back = createSprite(0xFF3399);

// Add the PaperSprite to the display list

addChild ( myPaperSprite );

// This method just creates coloured boxes for the demo

function createSprite (colour:uint):Sprite
{
	var mySprite:Sprite = new Sprite();
	mySprite.graphics.beginFill ( colour );
	mySprite.graphics.drawRect (0,0,100,100);
	mySprite.graphics.endFill ();
	return mySprite;
}

// Listen for the enterFrame event

addEventListener ( Event.ENTER_FRAME, spin );

/*
Move and rotate your PaperSprite in any way you want - it will
update it's visible face automatically!
*/

function spin ( event:Event ):void
{
	var mX:Number = ((mouseX / stage.stageWidth) - 0.5) * 360;
	var mY:Number = ((mouseY / stage.stageHeight) - 0.5) * 360;

	myPaperSprite.rotationY += (mX - myPaperSprite.rotationY) / 40;
	myPaperSprite.rotationX += (mY - myPaperSprite.rotationX) / 40;
}</pre>
<p>Publish the movie and you’re all done!</p>
<h2>Background</h2>
<p>Flash Player 10’s new 3D capabilities are a much welcomed and exiting addition, and although their implementation at first seemed a little obtuse after using libraries such as Papervision3D, Adobe’s implementation is beginning to make a lot more sense to me. Rather than being handed a complete 3D library, developer’s have been given the necessary building blocks to use 3D, or 2.5D with less ‘hacks’ and arguably better performance where it matters.</p>
<p>Time will tell, but I personally think this will be a positive development for existing frameworks like Papervision and Sandy, because whilst Flash can now natively handle certain tasks like triangle drawing, 3D matrices etc &#8211; implementing cameras and shaders, loading and building meshes and so on is something which developers will still require. If this can plug neatly into Flash Player’s capabilities and possibly yield increased performance then all the better.</p>
<p>In more basic situations though, the ability to rotate a DisplayObject around its X, Y and Z axis, as well as finally having a Z property, is useful for adding basic 3D effects, even if your project doesn’t require anything more sophisticated than that.</p>
<p>But this is where some gaps begin to arise. Z sorting, for example, will be required, and <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.unitzeroone.com/" >Ralph Hauwert</a> (a member of the Papervision3D team) has already written a <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://theflashblog.com/?p=470" >useful script</a> for this.</p>
<h2>Two Sided DisplayObjects</h2>
<p>Another common use for Flash Player 10’s 3D capabilities is to create <strong>double sided sprites</strong> or planes, than can be rotated to reveal alternate content on either side. Again, I would have expected this to be a new property of DisplayObjectContainer, so that <strong><em>front </em></strong>and <strong><em>back </em></strong>could be passed to it as DisplayObjects. This isn’t the case though, so it requires some minimal work around.</p>
<p><a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://theflashblog.com/" >Lee Brimelow</a> demonstrated <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.gotoandlearn.com/play?id=91"  target="_blank">one approach</a> to this, which was to monitor the rotation of a DisplayObject, and swap the visible faces accordingly (<a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://flashartofwar.com/2008/11/16/two-sided-plane-fp-10/"  target="_blank">Jesse Freeman</a> also used this technique). This works great in many cases, however it doesn’t give the desired results when the parent DisplayObject is off centre and therefore subject to the perspective of the 3D environment. It also means that if you are rotating the DisplayObject around multiple axis then the calculations required get slightly more complex.</p>
<h2>The Solution</h2>
<p>As ever, the wise and prolific <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.senocular.com/" >Senocular</a> came to the rescue. He described a technique whereby 3 points are placed on the surface of the DisplayObject, and by determining the winding direction of these points when translated from 3D to 2D space; one is able to determine which way the DisplayObject is facing. Because this is relative to the perspective used to produce this transformation, the result is true to the point of view of the user.</p>
<p>Senocular published his helper class which will return a Boolean value indicating whether a given DisplayObject is front facing or not, and so I wish to stress that all credit is his for <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.senocular.com/?id=2.57"  target="_blank">his solution</a> and wonderfully clear <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://www.kirupa.com/forum/showthread.php?t=315821"  target="_blank">explanation of the process</a>.</p>
<p>I did feel that it might be beneficial though to wrap this up, along with other functionality, into a class which solved the double sided DisplayObject issue, and so I introduce the <strong>PaperSprite </strong>class (I chose to call it <em>PaperSprite </em>so that it isn’t confused with <em>Sprite3D</em> if you use another 3D library).</p>
<h2>How to use PaperSprite</h2>
<p>Creating a two sided Plane using PaperSprite is simple:</p>
<pre lang="actionscript">import soulwire.display.PaperSprite;

var mySprite:PaperSprite = new PaperSprite();

// Any type of DisplayObject can be used for each face
mySprite.front = new Sprite();
mySprite.back = new Bitmap( myImage );</pre>
<p>So you can use any DisplayObject for the front and reverse sides; MovieClips, Sprites, Bitmaps, Shapes, Loaders etc. <strong>These can also be set via the constructor</strong>&#8230;</p>
<p><del datetime="2009-01-02T12:53:05+00:00">Another property of PaperSprite is <strong>whether is updates it’s display automatically</strong>. If <em>true</em>, once the PaperSprite is added to the stage it will update its visible face autonomously, however if you have a more general render loop where you’re controlling your 3D scene from, you can set this to <em>false </em>and then call the <strong>update </strong>method when calculating the visible face is required:</del></p>
<blockquote><p>Thanks to <a rel="nofollow" href="http://blog.soulwire.co.uk//goto/http://flashartofwar.com/"  target="_blank">Jesse Freeman</a> for suggesting a method to limit unnecessary calls to the <em>update </em>method. By overriding the setters for the position and rotation properties and using <strong>stage.invalidate()</strong>, then listening for the render event (Event.RENDER), the calculations needed to determine the visible face of the PaperSprite need only be made if one or more properties have been changed and if the PaperSprite needs to be rendered. Therefore there is no longer a need for autoUpdate, everything is handled internally by the PaperSprite class. Cheers Jesse! :)</p></blockquote>
<p>&#8230;The other useful feature is the <strong>pivot </strong>property. By default, a PaperSprite will pivot (rotate around) its <strong>centre point</strong>, which will be automatically calculated for each face depending on its respective dimensions. Alternatively, if you want the PaperSprite to rotate around the <em>top left</em> corner, <em>bottom right</em>, or indeed any point on its surface, you can set the pivot property, which is a Point object and requires 2 normalised values, representing the fraction of the width and height of the PaperSprite at which you want to place the pivot.</p>
<p>So to set the PaperSprite to rotate around its centre (this is set by default) you can use:</p>
<pre lang="actionscript">mySprite.pivot = new Point( 0.5, 0.5 );</pre>
<p>And its Top Left corner:</p>
<pre lang="actionscript">mySprite.pivot = new Point( 0.0, 0.0 );</pre>
<p>And its top centre:</p>
<pre lang="actionscript">mySprite.pivot = new Point( 0.5, 0.0 );</pre>
<p>And so on!</p>
<p>You can also access its <strong>isFrontFacing </strong>property at any time:</p>
<pre lang="actionscript">if ( mySprite.isFrontFacing )
{
	doSomethingGood();
}</pre>
<p>An finally, removing the front or back face from its display list (or indeed not defining one at all) will cause the PaperSprite to <em>display the available face at all times</em>, essentially giving it the default behaviour of a one sided Sprite.</p>
<h2>Download the PaperSprite class</h2>
<p>Again, this is really just a glorified augmentation of Senocular’s solution to finding the front facing side of a DisplayObject in 3D. All credit should go to him for creating such an elegant solution. I built this class in order to simplify its use and provide the extra functionality needed to quickly start working with a two-sided DisplayObject.</p>
<a href="http://blog.soulwire.co.uk/wp-content/plugins/download-monitor/download.php?id=papersprite.zip" class="download" title="PaperSprite Class & Demo: The PaperSprite class is a double sided DisplayObject, allowing for custom front and reverse side DisplayObjects which will appear as a 3D card when rotated in 3D space."  rel="nofollow"><strong>Download:</strong> PaperSprite Class & Demo</a>


<p>Related posts:<ol><li><a href='http://blog.soulwire.co.uk/code/actionscript-3/fit-a-displayobject-into-a-rectangle' rel='bookmark' title='Permanent Link: Fit DisplayObject into Rectangle'>Fit DisplayObject into Rectangle</a></li>
<li><a href='http://blog.soulwire.co.uk/laboratory/flash/as3-flocking-steering-behaviors' rel='bookmark' title='Permanent Link: Flipping you the Boid'>Flipping you the Boid</a></li>
<li><a href='http://blog.soulwire.co.uk/code/actionscript-3/managing-runtime-loaded-dynamic-assets' rel='bookmark' title='Permanent Link: Hello Dynamic Sprite'>Hello Dynamic Sprite</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.soulwire.co.uk/code/open-source/two-sided-planes-in-flash-player-10/feed</wfw:commentRss>
		<slash:comments>108</slash:comments>
		</item>
	</channel>
</rss>

