<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for Soulwire</title>
	<atom:link href="http://blog.soulwire.co.uk/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.soulwire.co.uk</link>
	<description>Art + Technology</description>
	<lastBuildDate>Sun, 07 Mar 2010 20:16:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on BitmapData Colour Palette by Alan Week 5 &#171; Group Awesome</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/colourutils-bitmapdata-extract-colour-palette/comment-page-4#comment-8867</link>
		<dc:creator>Alan Week 5 &#171; Group Awesome</dc:creator>
		<pubDate>Sun, 07 Mar 2010 20:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=195#comment-8867</guid>
		<description>[...] http://blog.soulwire.co.uk/flash/actionscript-3/colourutils-bitmapdata-extract-colour-palette [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.soulwire.co.uk/flash/actionscript-3/colourutils-bitmapdata-extract-colour-palette"  rel="nofollow">http://blog.soulwire.co.uk/flash/actionscript-3/colourutils-bitmapdata-extract-colour-palette</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AS3 Webcam Motion Tracking by Lymphatus</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/webcam-motion-detection-tracking/comment-page-17#comment-8812</link>
		<dc:creator>Lymphatus</dc:creator>
		<pubDate>Fri, 05 Mar 2010 11:39:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=72#comment-8812</guid>
		<description>It seems the AS2 version was taken out of the .zip..
is there any way to get it? If you could mail it to me, that would be much appreciated.
I am an art student experimenting with motion tracking, but I only have experience with AS2..</description>
		<content:encoded><![CDATA[<p>It seems the AS2 version was taken out of the .zip..<br />
is there any way to get it? If you could mail it to me, that would be much appreciated.<br />
I am an art student experimenting with motion tracking, but I only have experience with AS2..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Smack My Glitch Up by Matt</title>
		<link>http://blog.soulwire.co.uk/laboratory/flash/as3-bitmapdata-glitch-generator/comment-page-2#comment-8811</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 05 Mar 2010 10:02:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=1003#comment-8811</guid>
		<description>Need a Fullscreen version, would love to load this up on a few people who wonder off from their machines!</description>
		<content:encoded><![CDATA[<p>Need a Fullscreen version, would love to load this up on a few people who wonder off from their machines!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Generative Prints for Ishihara by Woody</title>
		<link>http://blog.soulwire.co.uk/art-design/illustration/generative-illustrations-for-ishihara/comment-page-1#comment-8797</link>
		<dc:creator>Woody</dc:creator>
		<pubDate>Mon, 01 Mar 2010 09:18:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=1042#comment-8797</guid>
		<description>These are very good, programmed art is why I just keep coming back to soulwire :D</description>
		<content:encoded><![CDATA[<p>These are very good, programmed art is why I just keep coming back to soulwire :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AS3 Shuffle Grid Class by sabee</title>
		<link>http://blog.soulwire.co.uk/code/open-source/as3-drag-drop-shuffle-grid-menu/comment-page-4#comment-8789</link>
		<dc:creator>sabee</dc:creator>
		<pubDate>Sat, 27 Feb 2010 17:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=311#comment-8789</guid>
		<description>Thank you very much for your script!
I&#039;ve made a adjustment for the grid to work irregulary.  It&#039;s probably not the best optimized but works perfect for me and could work for others.

Here is what I do:

1) I declare an empty grid at start:
this.grid  = new ShuffleGrid(0, 0, ThumbGiftZone.WIDTH, ThumbGiftZone.HEIGHT, paddingGrid);
addChild(grid)

2) I add (in a loop or not) items to the grid with:

var maxCols:uint = Math.floor(stage.stageWidth / (ThumbGiftZone.WIDTH + padding));
grid.updateIndexArray(1, maxCols);

var thumb:ThumbGiftZone = new ThumbGiftZone();
grid.addItem(thumb);

You can see I added a new function inside ShuffleGrid.as, here it is:
&lt;pre&gt;
public function updateIndexArray(numToAdd:int, maxCols:int):void
		{
			var tempNumItems:uint = numItems + numToAdd;
			var i:int;
			var j:int;
			var cols:int;
			var dif:int;
			
			var rows:int = Math.ceil(tempNumItems / maxCols);
			
			for (i = 0; i &lt; rows; i++)
			{
				if(_index.length &lt; rows)
				{
					_index.push(new Array());
				}
				
				// Pour chaque row on détermine le nombre de col. Tous sauf la dernière auront le maxCols
				cols = (i &lt; rows-1)?maxCols:tempNumItems - (i * maxCols);
				
				if(_index[i].length &lt; cols)
				{
					dif = cols - _index[i].length;
					for (j = 0; j  1)?maxCols:cols;
		}
&lt;/pre&gt;


Then I did chane shuffelItems:
&lt;pre&gt;
private function shuffleItems() : void
		{
			var itemVO : ShuffleGridItemVO = _dictionary[_currentItem];
			var cell : Point = getCell(_currentItem.x, _currentItem.y);
			
			var col : int = cell.x;
			var row : int = (getItemAtPosition(cell.y, cell.x) != null)?cell.y: itemVO.row;
			
			if(col == itemVO.col &amp;&amp; row == itemVO.row)
			{
				return;
			}
			
			var hMove : int = col - itemVO.col;
			var vMove : int = (row == itemVO.row)?0:row - itemVO.row;
			
			
			var i : int;
			var item : ShuffleGridItemVO;
			var move : Array = [];

			if(hMove = itemVO.col + hMove; i--)
				{
					if(_index[itemVO.row][i])
					{
						item = _index[itemVO.row][i];
						item.col++;
						
						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}
			else
			{
				for (i = itemVO.col + 1;i &lt;= itemVO.col + hMove; i++)
				{
					if(_index[itemVO.row][i])
					{
						item = _index[itemVO.row][i];
						item.col--;
						
						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}

			if(vMove = itemVO.row + vMove; i--)
				{
					if(_index[i][itemVO.col + hMove])
					{
						item = _index[i][itemVO.col + hMove];
						item.row++;
						
						if(item.col &gt;= _index[item.row].length)
						{
							item.col = _index[item.row].length - 1;
						}
						
						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}
			else
			{
				for (i = itemVO.row + 1;i &lt;= itemVO.row + vMove; i++)
				{
					
					if(_index[i][itemVO.col + hMove])
					{
						item = _index[i][itemVO.col + hMove];
						item.row--;
						
						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}
			
			for (i = 0;i  col)
			{
				itemVO.col = col;	
			}
			
			_index[row][itemVO.col] = itemVO;
		}

&lt;/pre&gt;
AND getItemAtPosition
&lt;pre&gt;
public function getItemAtPosition(row : int, col : int) : ShuffleGridItemVO
		{
			var item:ShuffleGridItemVO;
			
			if(_index[row] != null &amp;&amp; _index[row].length &gt; col)
			{
				item = _index[row][col];
			}else
			{
				item = null;
			}
			return item;
		}

&lt;/pre&gt;
The whole idea I use is that, even though there is a grid of 6 x 2 for example, if there no &quot;thumb&quot; at row 2, col 3 then I don&#039;t allow the move and don&#039;t update the v move during the shuffleItems()</description>
		<content:encoded><![CDATA[<p>Thank you very much for your script!<br />
I&#8217;ve made a adjustment for the grid to work irregulary.  It&#8217;s probably not the best optimized but works perfect for me and could work for others.</p>
<p>Here is what I do:</p>
<p>1) I declare an empty grid at start:<br />
this.grid  = new ShuffleGrid(0, 0, ThumbGiftZone.WIDTH, ThumbGiftZone.HEIGHT, paddingGrid);<br />
addChild(grid)</p>
<p>2) I add (in a loop or not) items to the grid with:</p>
<p>var maxCols:uint = Math.floor(stage.stageWidth / (ThumbGiftZone.WIDTH + padding));<br />
grid.updateIndexArray(1, maxCols);</p>
<p>var thumb:ThumbGiftZone = new ThumbGiftZone();<br />
grid.addItem(thumb);</p>
<p>You can see I added a new function inside ShuffleGrid.as, here it is:</p>
<pre>
public function updateIndexArray(numToAdd:int, maxCols:int):void
		{
			var tempNumItems:uint = numItems + numToAdd;
			var i:int;
			var j:int;
			var cols:int;
			var dif:int;

			var rows:int = Math.ceil(tempNumItems / maxCols);

			for (i = 0; i &lt; rows; i++)
			{
				if(_index.length &lt; rows)
				{
					_index.push(new Array());
				}

				// Pour chaque row on détermine le nombre de col. Tous sauf la dernière auront le maxCols
				cols = (i &lt; rows-1)?maxCols:tempNumItems - (i * maxCols);

				if(_index[i].length &lt; cols)
				{
					dif = cols - _index[i].length;
					for (j = 0; j  1)?maxCols:cols;
		}
</pre>
<p>Then I did chane shuffelItems:</p>
<pre>
private function shuffleItems() : void
		{
			var itemVO : ShuffleGridItemVO = _dictionary[_currentItem];
			var cell : Point = getCell(_currentItem.x, _currentItem.y);

			var col : int = cell.x;
			var row : int = (getItemAtPosition(cell.y, cell.x) != null)?cell.y: itemVO.row;

			if(col == itemVO.col &amp;&amp; row == itemVO.row)
			{
				return;
			}

			var hMove : int = col - itemVO.col;
			var vMove : int = (row == itemVO.row)?0:row - itemVO.row;

			var i : int;
			var item : ShuffleGridItemVO;
			var move : Array = [];

			if(hMove = itemVO.col + hMove; i--)
				{
					if(_index[itemVO.row][i])
					{
						item = _index[itemVO.row][i];
						item.col++;

						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}
			else
			{
				for (i = itemVO.col + 1;i &lt;= itemVO.col + hMove; i++)
				{
					if(_index[itemVO.row][i])
					{
						item = _index[itemVO.row][i];
						item.col--;

						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}

			if(vMove = itemVO.row + vMove; i--)
				{
					if(_index[i][itemVO.col + hMove])
					{
						item = _index[i][itemVO.col + hMove];
						item.row++;

						if(item.col &gt;= _index[item.row].length)
						{
							item.col = _index[item.row].length - 1;
						}

						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}
			else
			{
				for (i = itemVO.row + 1;i &lt;= itemVO.row + vMove; i++)
				{

					if(_index[i][itemVO.col + hMove])
					{
						item = _index[i][itemVO.col + hMove];
						item.row--;

						_index[item.row][item.col] = item;
						move.push(item);
					}
				}
			}

			for (i = 0;i  col)
			{
				itemVO.col = col;
			}

			_index[row][itemVO.col] = itemVO;
		}
</pre>
<p>AND getItemAtPosition</p>
<pre>
public function getItemAtPosition(row : int, col : int) : ShuffleGridItemVO
		{
			var item:ShuffleGridItemVO;

			if(_index[row] != null &amp;&amp; _index[row].length &gt; col)
			{
				item = _index[row][col];
			}else
			{
				item = null;
			}
			return item;
		}
</pre>
<p>The whole idea I use is that, even though there is a grid of 6 x 2 for example, if there no &#8220;thumb&#8221; at row 2, col 3 then I don&#8217;t allow the move and don&#8217;t update the v move during the shuffleItems()</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Double Sided 3D Plane in FP10 by Soulwire</title>
		<link>http://blog.soulwire.co.uk/code/open-source/two-sided-planes-in-flash-player-10/comment-page-7#comment-8751</link>
		<dc:creator>Soulwire</dc:creator>
		<pubDate>Fri, 26 Feb 2010 00:48:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=273#comment-8751</guid>
		<description>Cheers John.

Yes, you&#039;re right it&#039;s desirable to nullify the 3D transformation matrix once you&#039;re done rotating so that Flash player won&#039;t draw the plane as a bitmap.

I need to update this class as there are a few little bugs and improvements, so I&#039;ll be sure to include this feature.

Thanks!</description>
		<content:encoded><![CDATA[<p>Cheers John.</p>
<p>Yes, you&#8217;re right it&#8217;s desirable to nullify the 3D transformation matrix once you&#8217;re done rotating so that Flash player won&#8217;t draw the plane as a bitmap.</p>
<p>I need to update this class as there are a few little bugs and improvements, so I&#8217;ll be sure to include this feature.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Double Sided 3D Plane in FP10 by John M.</title>
		<link>http://blog.soulwire.co.uk/code/open-source/two-sided-planes-in-flash-player-10/comment-page-7#comment-8750</link>
		<dc:creator>John M.</dc:creator>
		<pubDate>Fri, 26 Feb 2010 00:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=273#comment-8750</guid>
		<description>Just wanted to throw this out there in regards to pixel precision.  I had to modify your class based upon the techniques here:

http://www.flashandmath.com/flashcs4/blursol/index.html

WIthout adding in that code, once a plane is rotated and rotated back to 0, it was not pixel precise.  Here is my modification that made it work:

public function set front( value:DisplayObject ):void
		{
			if ( _front &amp;&amp; contains( _front ) )
			{
				removeChild( _front );
			}
			
			var photoXFactor:Number=value.width/(value.width+1);
			var photoYFactor:Number=value.height/(value.height+1);
			_front = addChild( value );
			_front.scaleX = photoXFactor
			_front.scaleY = photoYFactor
			_front.z = 0
			alignFaces();
		}</description>
		<content:encoded><![CDATA[<p>Just wanted to throw this out there in regards to pixel precision.  I had to modify your class based upon the techniques here:</p>
<p><a rel="nofollow" href="http://blog.soulwire.co.uk/goto/http://www.flashandmath.com/flashcs4/blursol/index.html"  rel="nofollow">http://www.flashandmath.com/flashcs4/blursol/index.html</a></p>
<p>WIthout adding in that code, once a plane is rotated and rotated back to 0, it was not pixel precise.  Here is my modification that made it work:</p>
<p>public function set front( value:DisplayObject ):void<br />
		{<br />
			if ( _front &amp;&amp; contains( _front ) )<br />
			{<br />
				removeChild( _front );<br />
			}</p>
<p>			var photoXFactor:Number=value.width/(value.width+1);<br />
			var photoYFactor:Number=value.height/(value.height+1);<br />
			_front = addChild( value );<br />
			_front.scaleX = photoXFactor<br />
			_front.scaleY = photoYFactor<br />
			_front.z = 0<br />
			alignFaces();<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AS3 Music Visualisation by J_Mo</title>
		<link>http://blog.soulwire.co.uk/laboratory/flash/actionscript3-dynamic-sound-visualisation/comment-page-8#comment-8747</link>
		<dc:creator>J_Mo</dc:creator>
		<pubDate>Thu, 25 Feb 2010 13:20:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=34#comment-8747</guid>
		<description>Loving this...just like many others by the look.

This may be a simple one to asnwer.....How can I make the track loop??</description>
		<content:encoded><![CDATA[<p>Loving this&#8230;just like many others by the look.</p>
<p>This may be a simple one to asnwer&#8230;..How can I make the track loop??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Generative Prints for Ishihara by Lauri Laatikainen</title>
		<link>http://blog.soulwire.co.uk/art-design/illustration/generative-illustrations-for-ishihara/comment-page-1#comment-8686</link>
		<dc:creator>Lauri Laatikainen</dc:creator>
		<pubDate>Mon, 22 Feb 2010 17:20:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=1042#comment-8686</guid>
		<description>Those are really sweet! Any chance you could let slip some hint&#039;s on what goes down deep down in the source? pretty please ;)</description>
		<content:encoded><![CDATA[<p>Those are really sweet! Any chance you could let slip some hint&#8217;s on what goes down deep down in the source? pretty please ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 3D Ribbons in Papervision by Soulwire</title>
		<link>http://blog.soulwire.co.uk/code/actionscript-3/papervision3d-ribbons/comment-page-5#comment-8683</link>
		<dc:creator>Soulwire</dc:creator>
		<pubDate>Mon, 22 Feb 2010 12:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.soulwire.co.uk/?p=76#comment-8683</guid>
		<description>Hi Zeta.

The 0 bitwise shift simple floors the number, so it is the same as &lt;strong&gt;Math.floor()&lt;strong&gt; but faster to compute. You could also cast the number to an integer, which is also fast:

&lt;pre&gt;for (var i:int = 0; i &lt; int( d * .6); i++)&lt;/pre&gt;

However looking at this code now, it is foolish to evaluate this expression at every iteration, so perhaps you should use:

&lt;pre&gt;
var n : int = d * .6;
for (var i:int = 0; i &lt; n; i++)
[...]
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Zeta.</p>
<p>The 0 bitwise shift simple floors the number, so it is the same as <strong>Math.floor()</strong><strong> but faster to compute. You could also cast the number to an integer, which is also fast:</p>
<pre>for (var i:int = 0; i < int( d * .6); i++)</pre>
<p>However looking at this code now, it is foolish to evaluate this expression at every iteration, so perhaps you should use:</p>
</pre>
<pre>
var n : int = d * .6;
for (var i:int = 0; i < n; i++)
[...]
</pre>
</pre>
<p></strong></p>
]]></content:encoded>
	</item>
</channel>
</rss>
