<?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>FlashFuck.it &#187; Flash Player</title>
	<atom:link href="http://www.flashfuck.it/category/flash-player/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flashfuck.it</link>
	<description>flash platform, gaming and 3D</description>
	<lastBuildDate>Mon, 23 Jan 2012 18:11:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Light on BitmapData memory allocation</title>
		<link>http://www.flashfuck.it/2012/01/23/light-on-bitmapdata-memory-allocation/</link>
		<comments>http://www.flashfuck.it/2012/01/23/light-on-bitmapdata-memory-allocation/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 18:11:43 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[internals]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[reversing]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=240</guid>
		<description><![CDATA[Recently at the office we&#8217;ve been dealing with a strange BitmapData memory occupation behavior I want to share with you guys. On this subject the AS3 reference reads &#8220;A BitmapData object contains an array of pixel data. This data can represent either a fully opaque bitmap or a transparent bitmap that contains alpha channel data. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently at the office we&#8217;ve been dealing with a strange BitmapData memory occupation behavior I want to share with you guys.</p>
<p>On this subject the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html">AS3 reference</a> reads &#8220;A BitmapData object contains an array of pixel data. This data can represent either a fully opaque bitmap or a transparent bitmap that contains alpha channel data. Either type of BitmapData object is stored as a buffer of 32-bit integers. Each 32-bit integer determines the properties of a single pixel in the bitmap.&#8221;</p>
<p style="text-align: center;">This should be meaning that a BitmapData object should be represented in memory as a sequence of 32 bits integers, one for each pixel in the bitmap, hence width*height*4 bytes which definitely makes sense.<br />
However the actual behavior is significantly different and you can easily find out that the real BitmapData size in memory is not proportional to its area as it should be.<br />
Let&#8217;s see an example (code shared at wonderfl)<br />
<a title="BitmapData Memory Allocation" href="http://wonderfl.net/c/t6eA"><img class="alignnone aligncenter" title="BitmapData memory occupation" src="http://farm8.staticflickr.com/7026/6748193465_33412391c5_o.png" alt="" width="464" height="466" /><br />
BitmapData Memory Allocation &#8211; wonderfl build flash online</a></p>
<p>The example shows how different the size of a BitmapData is depending on its maximum dimension: the code instantiates 4096 images with an increasing area from 1  up to 4096 pixels, first with a horizontal extension (width is the increasing dimension, blue line in the chart) then with a vertical extension (height is the increasing dimension, red line in the chart).<br />
You can notice that the behaviors of the lines in the chart are very different and the blue line&#8217;s Y is increasing only few times whilst the red one&#8217;s (vertical bitmap) is increasing much more frequently and is reaching much higher values.<br />
So what&#8217;s the real memory representation of a BitmapData? For sure it isn&#8217;t a width*height*4 matrix as it should be and it is stricly related to the dimension the BitmapData is extended on.</p>
<p>We worked a bit on this thing at the office (thanx to Matteo Lanzi) and we found out that BitmapData object memory allocator has a strange behavior: it allocates N chunks of memory aligned to 256bytes (64 pixels) at time.<br />
This would be a useful behavior if the BitmapData object would be resizable via actionscript, but it is not, or if the freed chunks were put in a memory pool and used by the next BitmapData requiring memory, but it doesn&#8217;t seem to do that ( the only case we noticed that the memory is reused is when a NxM BitmapData is created, deleted and recreated with the same N and M dimensions ).<br />
If it was only this however it wouldn&#8217;t have been such a big problem to deal with, the real big issue is that a 256b chunk is representing a sequence of pixels with a defined horizontal orientation.<br />
This hardcoded behavior leads to a very unpleasant side effect: a BitmapData instance with a high number of little rows (high height, little width,, hence a &#8216;vertical&#8217; orientation) is occupying a HUGE AMOUNT OF MEMORY while it should be occupying the same memory of a bitmap with the same area rotated by 90°.<br />
Let&#8217;s seesome more example just to clear out the problem:</p>
<p>Case 1:<br />
- width 1px<br />
- height 1px<br />
- expected allocation: 4 bytes<br />
- actual allocation: 256 bytes (minimum chunk)</p>
<p><img class="alignnone" title="BitmapData 1x1" src="http://farm8.staticflickr.com/7004/6749302845_0d762dc745_o.gif" alt="" width="256" height="4" /></p>
<p>a 1&#215;1 px BitmapData allocates in the heap 1 chunk of 256 bytes while only 4 bytes would be needed!!<strong> 63x overhead!!!</strong></p>
<p>Case 2:<br />
- width 64px<br />
- height 1px<br />
- expected allocation: 256 bytes<br />
- actual allocation: 256 bytes (fits exactly the minimum chunk)</p>
<p><img class="alignnone" title="BitmapData 64x1" src="http://farm8.staticflickr.com/7170/6749302923_76c2acbb24_o.gif" alt="" width="256" height="4" /></p>
<p>the same 256 bytes are allocated by a 64&#215;1 bitmap and the overhead disappears, what does happen with a 65&#215;1 one?</p>
<p>Case 3:<br />
- width 65px<br />
- height 1px<br />
- expected allocation: 260 bytes<br />
- actual allocation: 512 bytes (2 chunks)</p>
<p><img class="alignnone" title="65x1 BitmapData" src="http://farm8.staticflickr.com/7146/6749303003_8e15f41335_o.gif" alt="" width="256" height="8" /></p>
<p>with a &#8216;max chunk size plus one&#8217; size a 65 px wide image allocates 2 chunks, the overhead is set to approx 1.9x.</p>
<p>Case 4<br />
- width 1px<br />
- height 64px<br />
- expected allocation: 256 bytes (same area of the 64&#215;1 one&#8230;)<br />
- actual allocation: 16 Kb!!!!!</p>
<p><img class="alignnone" title="1x64 BitmapData" src="http://farm8.staticflickr.com/7003/6749303093_5935208895_o.gif" alt="" width="256" height="64" /></p>
<p>this is the worst case, every in 1xN bitmaps have the maximum overhead possible: <strong>63x!</strong><br />
So try to think about an image very narrow and high, let&#8217;s say a 1&#215;4096 one: you would expect it to be 16kb in memory (4096*4 bytes) but it actually is <strong>1 whole megabyte</strong> (4096*4<strong>*256</strong>!!)!!</p>
<p>So, the formula to calculate the ACTUAL memory allocated by a BitmapData expressed in bytes I came up with is:</p>
<p style="text-align: center;"><strong>Math.max( 1 , height*(width/64)&gt;&gt;0  )*256</strong></p>
<p>You can see a more detailed and complete dataset in this google spreadsheet <a href="http://bit.ly/FlashBitmapDataAllocation">http://bit.ly/FlashBitmapDataAllocation</a> (feel free to spread the link) containing data for BitmapData memory occupation from 1&#215;1 to 1&#215;4096 and from 1&#215;1 to 4096&#215;1.<br />
The test to reproduce the dataset is available on github at this url <a href="https://github.com/pigiuz/Tests/blob/master/src/BitmapDataMemoryAllocation.as">https://github.com/pigiuz/Tests/blob/master/src/BitmapDataMemoryAllocation.as</a> (feel free to share this link as well)</p>
<p>This behavior has been tested in AIR 3.1 for Mac OSX 10.6 (snow leopard), 10.7 (lion) (thanx to Marco Nava for testing on lion), Window 7, Android 4.0, iOS 5 (thanx to Shawn Blais for testing on mobile),<br />
Flash Player 11,1 by yourself (if you ran the swf linked backward in the post and noticed the same behavior).</p>
<p>After figuring out the problem we opened a bug in adobe&#8217;s jira, if you have comments which can raise the attention of adobe on this stuff or add something to the discussion please feel free to comment at this url <a href="https://bugbase.adobe.com/index.cfm?event=bug&amp;id=3094186">https://bugbase.adobe.com/index.cfm?event=bug&amp;id=3094186</a> (you&#8217;re welcome to comment here too btw <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>Few more points worth some attention:<br />
I tried to measure the memory in 3 ways:<br />
- the data got back from flash.sampler.getSize() was not accurate, most of the time it was totally wrong and not predictable (or perhaps I didn&#8217;t get how it works in relation with BitmapData objects)<br />
- the delta calculated with a pre and post sampling of System.privateMemory is more accurate than getSize() and fits the expected results in AIR but it&#8217;s not as accurate as I expected: in the spreadsheet linked backwards you can see that the results have a coherent trend, but there&#8217;s a lot of garbage data and little bitmaps weren&#8217;t detected at all.<br />
- the delta calculated witn a pre and post sampling of System.totalMemory is more accurate than System.privateMemory only in flash player.</p>
<p>&nbsp;</p>
<p>That said,<br />
I find this allocation behavior weird, and the worst thing is that it <strong>UNDOCUMENTED </strong>and the docs are saying a different thing. I see one VERY significant bad side effects in this way of allocating bitmaps memory that involve how BitmapData objects are stricly tied to the Flash Player&#8217;s and AIR runtime&#8217;s APIs:<br />
<strong>flash.display.Loader generates BitmapData instances when it loads images from URL or streams</strong>, so if an application needs to load many bitmaps that don&#8217;t fit the memory alignment there will possibly be a HUGE memory waste.<br />
A possible solution could be the creation of few additional functions such as</p>
<p style="text-align: center;"><strong>loadInto(urlrequest:URLRequest, destination:ByteArray):void</strong></p>
<p>and</p>
<p style="text-align: center;"><strong>loadBytesInto(bytes:ByteArray,destination:ByteArray):void</strong></p>
<p>which both take a data source and a preallocated bytearray as input and put outputs to the preallocated bytearray called destination.</p>
<p>&nbsp;</p>
<p>This is the first shot, I&#8217;d really like you guys to spread the word and help me to make adobe sensible on this topic as it&#8217;s really worth some effort to make flash and air runtimes even better than what they are now.</p>
<p>Thank you all in advance,<br />
ciao,</p>
<p>pigiuz</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2012/01/23/light-on-bitmapdata-memory-allocation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Away3D broomstick pixel perfect on a perspective lens</title>
		<link>http://www.flashfuck.it/2011/06/13/away3d-broomstick-pixel-perfect-on-a-perspective-lens/</link>
		<comments>http://www.flashfuck.it/2011/06/13/away3d-broomstick-pixel-perfect-on-a-perspective-lens/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 16:12:45 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash Player 11]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=232</guid>
		<description><![CDATA[I&#8217;m doing some experiments with &#8220;Broomstick&#8220;, the new born (alpha) version of Away3D which leverages the brand new Stage3D (molehill) of flash player 11 (incubator). Here&#8217;s the coded formula to obtain pixel perfect sprites by moving the camera in the Z axis just before rendering: // camera is the current Camera3D object with a PerspectiveLens [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some experiments with &#8220;<a href="http://away3d.com/">Broomstick</a>&#8220;, the new born (alpha) version of Away3D which leverages the brand new <a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/features/molehill.html">Stage3D (molehill)</a> of <a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/">flash player 11 (incubator)</a>.</p>
<p>Here&#8217;s the coded formula to obtain pixel perfect sprites by moving the camera in the Z axis just before rendering:</p>
<p>// camera is the current Camera3D object with a PerspectiveLens<br />
// h has to be the height of your current viewport<br />
var h:Number = /*current viewport*/stage3DProxy.viewPort.height;<br />
var fovy:Number = (camera.lens as PerspectiveLens).fieldOfView*Math.PI/180;<br />
camera.z = -(h/2) / Math.tan(fovy/2);</p>
<p>&#8230;just a snippet, hope you find it useful <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>More on this topic:<br />
- http://knol.google.com/k/perspective-transformation<br />
- http://en.wikipedia.org/wiki/3D_projection</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2011/06/13/away3d-broomstick-pixel-perfect-on-a-perspective-lens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BitmapData and Stage size limit</title>
		<link>http://www.flashfuck.it/2010/11/18/bitmapdata-and-stage-size-limit/</link>
		<comments>http://www.flashfuck.it/2010/11/18/bitmapdata-and-stage-size-limit/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 15:42:13 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[Stage]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=201</guid>
		<description><![CDATA[Short tips post BitmapData size limit: Up to flash 9 the size limit for a BitmapData object was 4096&#215;4096 pixels. With flash player 10 that limit was removed, but what does this exactly mean? May we be able to create 4097&#215;4097 sized bitmapdata instances? the answer is NO, we can&#8217;t. I just found an official [...]]]></description>
			<content:encoded><![CDATA[<p>Short tips post <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>BitmapData size limit:</strong><br />
Up to flash 9 the size limit for a BitmapData object was 4096&#215;4096 pixels.<br />
With flash player 10 that limit was removed, but what does this exactly mean? May we be able to create 4097&#215;4097 sized bitmapdata instances? the answer is NO, we can&#8217;t.<br />
I just found an official explanation of that here <a href="http://kb2.adobe.com/cps/496/cpsid_49662.html" target="_blank">http://kb2.adobe.com/cps/496/cpsid_49662.html</a></p>
<p>Just in case you don&#8217;t have the time\will to read it:<br />
- we still have a limit!<br />
- the limit is set to the maximum amount of pixels (16,777,215 (the decimal equivalent of 0xFFFFFF))<br />
- the maximum valid size of the bounding rectangle side is 8191</p>
<p><strong>Stage size limit:</strong><br />
It actually depends on the stage quality.<br />
With a high quality set the bound limit is 4050&#215;4050, if your content exceeds it gets cropped.<br />
With a low or medium quality the bound limit increases, there&#8217;s no official documentation about that (or at least I didn&#8217;t find it).<br />
Note that Adobe&#8217;s saying that &#8220;graphic artifacts&#8221; could be displayed when our stage &#8220;approaches&#8221; 3840 pixels range.</p>
<p>have fun <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2010/11/18/bitmapdata-and-stage-size-limit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Graphics Unleashed at WebTech</title>
		<link>http://www.flashfuck.it/2010/11/10/flash-graphics-unleashed-at-webtech/</link>
		<comments>http://www.flashfuck.it/2010/11/10/flash-graphics-unleashed-at-webtech/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 08:58:49 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[TheFlashMind]]></category>
		<category><![CDATA[WebTechCon]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=198</guid>
		<description><![CDATA[As my previous post was announcing, cancelling and reannouncing, I&#8217;m speaking at WebTech Conference here in Milan. Here&#8217;s my presentation slides Webtech Conference Italy 2010 &#8211; Flash Graphics Unleashed View more presentations from Piergiorgio Niero. And here&#8217;s the examples zip: www.flashfuck.it/webtech/examples.zip If you need something to be more clear or some further explanation please feel [...]]]></description>
			<content:encoded><![CDATA[<p>As my previous post was announcing, cancelling and reannouncing, I&#8217;m speaking at WebTech Conference here in Milan.<br />
Here&#8217;s my presentation slides</p>
<div style="width:425px" id="__ss_5723876"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/piergiorgioniero/webtech-conference-italy-2010-flash-graphics-unleashed" title="Webtech Conference Italy 2010 - Flash Graphics Unleashed">Webtech Conference Italy 2010 &#8211; Flash Graphics Unleashed</a></strong><object id="__sse5723876" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webtech-101110024248-phpapp01&#038;stripped_title=webtech-conference-italy-2010-flash-graphics-unleashed&#038;userName=piergiorgioniero" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse5723876" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webtech-101110024248-phpapp01&#038;stripped_title=webtech-conference-italy-2010-flash-graphics-unleashed&#038;userName=piergiorgioniero" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/piergiorgioniero">Piergiorgio Niero</a>.</div>
</div>
<p>And here&#8217;s the examples zip: <a href="http://www.flashfuck.it/webtech/examples.zip">www.flashfuck.it/webtech/examples.zip</a><br />
If you need something to be more clear or some further explanation please feel free to comment this post <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2010/11/10/flash-graphics-unleashed-at-webtech/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BitmapData manipulation benchmark</title>
		<link>http://www.flashfuck.it/2009/07/15/bitmapdata-manipulation-benchmark/</link>
		<comments>http://www.flashfuck.it/2009/07/15/bitmapdata-manipulation-benchmark/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 19:54:49 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[BitmapData]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=144</guid>
		<description><![CDATA[Today I encountered this blog post from Zevan (which blog is REALLY a good daily reading I suggest everyone to take) about bitmapData merging and I started tweaking some code doing some benchmarks to find out which way is the most performing. Here are my tests: First strike (Zevan&#8217;s one): copyPixels [SWF(width=650, height=650)] var loader:Loader [...]]]></description>
			<content:encoded><![CDATA[<p>Today I encountered <a href="http://actionsnippet.com/?p=1760">this blog post from Zevan</a> (which blog is REALLY a good daily reading I suggest everyone to take) about bitmapData merging and I started tweaking some code doing some benchmarks to find out which way is the most performing. Here are my tests:</p>
<p>First strike (Zevan&#8217;s one): <strong>copyPixels</strong></p>
<pre lang="actionscript">
[SWF(width=650, height=650)]
var loader:Loader = new Loader();
loader.load(new URLRequest("http://actionsnippet.com/wp-content/chair.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
var w:Number;
var h:Number;
var rows:Number = 20;
var cols:Number = 20;
var tiles:Vector.<BitmapData> = new Vector.<BitmapData>();
var locX:Vector.<Number> = new Vector.<Number>();
var locY:Vector.<Number> = new Vector.<Number>();
var rX:Vector.<Number> = new Vector.<Number>();
var rY:Vector.<Number> = new Vector.<Number>();
var sX:Vector.<Number> = new Vector.<Number>();
var sY:Vector.<Number> = new Vector.<Number>();
function onLoaded(evt:Event):void{
	w = evt.target.width;
	h = evt.target.height;
	var image:BitmapData = Bitmap(evt.target.content).bitmapData;
	var tileWidth:Number = w / cols;
	var tileHeight:Number = h / rows;
	var inc:int = 0;
	var pnt:Point = new Point();
	var rect:Rectangle = new Rectangle(0,0,tileWidth,tileHeight);
	var startTime:Number = getTimer();
	for (var i:int = 0; i<rows; i++){
		for (var j:int = 0; j
<cols; j ++){
			 var currTile:BitmapData= new BitmapData(tileWidth, tileHeight, true, 0x00000000);
			 rect.x = j * tileWidth;
			 rect.y = i * tileHeight;
			 currTile.copyPixels(image, rect, pnt, null, null, true);
			 tiles[inc] = currTile;
			 rect.x += 25;
			 rect.y += 25;
			 sX[inc] = rect.x;
			 sY[inc] = rect.y;
			 locX[inc] = rX[inc] = -rect.width * 2
			 locY[inc] = rY[inc] =  Math.random() * stage.stageHeight;
			 setTimeout(startAnimation, inc *4 + 100, inc, rect.x, rect.y);
			 inc++;
		}
	}
	trace("copyPixels",getTimer()-startTime,"ms");
	addEventListener(Event.ENTER_FRAME, onLoop);
}
function startAnimation(index:int, dx:Number, dy:Number):void{
	var interval:Number;
	var animate:Function = function(index:int):void{
		locX[index] += (dx - locX[index]) / 4;
		locY[index] += (dy - locY[index]) / 4;
		if (Math.abs(locX[index] - dx) <1 &#038;&#038; Math.abs(locY[index] - dy)<1){
			locX[index] = dx;
			locY[index] = dy;
			clearInterval(interval);
		}
	}
   interval = setInterval(animate, 32, index);
}
var canvas:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,false, 0xFFFFFF);
addChild(new Bitmap(canvas));
var loc:Point = new Point();

function onLoop(evt:Event):void {
	  canvas.fillRect(canvas.rect, 0xFFFFFF);
	  var startTime:Number = getTimer();
	  for (var i:int = 0; i<tiles.length; i++){
			var tile:BitmapData= tiles[i];
			loc.x = locX[i];
			loc.y = locY[i];
			canvas.copyPixels(tile, tile.rect, loc, null, null, true);
	  }
	  trace("copyPixels",getTimer()-startTime,"ms");
}
</pre>
<p>in my machine (mbp, osx) it takes <strong>~27</strong> ms to extract data and ~2-3ms each iteration for setting data on the canvas bitmapData</p>
<p>Second strike: getVector\<strong>setVector</strong></p>
<pre lang="actionscript">
[SWF(width=650, height=650)]
var loader:Loader = new Loader();
loader.load(new URLRequest("http://actionsnippet.com/wp-content/chair.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
var w:Number;
var h:Number;
var rows:Number = 20;
var cols:Number = 20;
var tiles:Vector.<Vector.<uint>> = new Vector.<Vector.<uint>>();
var tileRect:Rectangle;
var locX:Vector.<Number> = new Vector.<Number>();
var locY:Vector.<Number> = new Vector.<Number>();
var rX:Vector.<Number> = new Vector.<Number>();
var rY:Vector.<Number> = new Vector.<Number>();
var sX:Vector.<Number> = new Vector.<Number>();
var sY:Vector.<Number> = new Vector.<Number>();
function onLoaded(evt:Event):void{
	w = evt.target.width;
	h = evt.target.height;
	var image:BitmapData = Bitmap(evt.target.content).bitmapData;
	var tileWidth:Number = w / cols;
	var tileHeight:Number = h / rows;
	tileRect = new Rectangle(0,0,tileWidth,tileHeight);
	var inc:int = 0;
	var pnt:Point = new Point();
	var rect:Rectangle = new Rectangle(0,0,tileWidth,tileHeight);
	var startTime:Number = getTimer();
	for (var i:int = 0; i<rows; i++){
		for (var j:int = 0; j
<cols; j ++){
			 rect.x = j * tileWidth;
			 rect.y = i * tileHeight;
			 tiles[tiles.length] = image.getVector(rect);
			 rect.x += 25;
			 rect.y += 25;
			 sX[inc] = rect.x;
			 sY[inc] = rect.y;
			 locX[inc] = rX[inc] = -rect.width * 2
			 locY[inc] = rY[inc] =  Math.random() * stage.stageHeight;
			 setTimeout(startAnimation, inc *4 + 100, inc, rect.x, rect.y);
			 inc++;
		}
	}
	trace("vector push:",getTimer()-startTime,"ms");
	addEventListener(Event.ENTER_FRAME, onLoop);
}
function startAnimation(index:int, dx:Number, dy:Number):void{
	var interval:Number;
	var animate:Function = function(index:int):void{
		locX[index] += (dx - locX[index]) / 4;
		locY[index] += (dy - locY[index]) / 4;
		if (Math.abs(locX[index] - dx) <1 &#038;&#038; Math.abs(locY[index] - dy)<1){
			locX[index] = dx;
			locY[index] = dy;
			clearInterval(interval);
		}
	}
   interval = setInterval(animate, 32, index);
}
var canvas:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,false, 0xFFFFFF);
addChild(new Bitmap(canvas));
var loc:Point = new Point();

function onLoop(evt:Event):void {
	  canvas.fillRect(canvas.rect, 0xFFFFFF);
	  var tmpVec:Vector.<uint>;
	  var startTime:Number = getTimer();
	  for (var i:int = 0; i<tiles.length; i++){
		  	tmpVec = tiles[i];
			tileRect.x = locX[i];
			tileRect.y = locY[i];
			canvas.setVector(tileRect,tmpVec);
	  }
	  trace("vector push:",getTimer()-startTime,"ms");
}
</pre>
<p>on my machine it takes only <strong>~9</strong> ms to extract tiles slices (yes, 3 times faster!!!) and ~1ms for pushing them all in the canvas for each loop iteration</p>
<p>Third strike: <strong>getPixels\setPixels</strong></p>
<pre lang="actionscript">
[SWF(width=650, height=650)]
var loader:Loader = new Loader();
loader.load(new URLRequest("http://actionsnippet.com/wp-content/chair.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
var w:Number;
var h:Number;
var rows:Number = 20;
var cols:Number = 20;
var tiles:Vector.<ByteArray> = new Vector.<ByteArray>();
var tileRect:Rectangle;
var locX:Vector.<Number> = new Vector.<Number>();
var locY:Vector.<Number> = new Vector.<Number>();
var rX:Vector.<Number> = new Vector.<Number>();
var rY:Vector.<Number> = new Vector.<Number>();
var sX:Vector.<Number> = new Vector.<Number>();
var sY:Vector.<Number> = new Vector.<Number>();
function onLoaded(evt:Event):void{
	w = evt.target.width;
	h = evt.target.height;
	var image:BitmapData = Bitmap(evt.target.content).bitmapData;
	var tileWidth:Number = w / cols;
	var tileHeight:Number = h / rows;
	tileRect = new Rectangle(0,0,tileWidth,tileHeight);
	var inc:int = 0;
	var pnt:Point = new Point();
	var rect:Rectangle = new Rectangle(0,0,tileWidth,tileHeight);
	var startTime:Number = getTimer();
	for (var i:int = 0; i<rows; i++){
		for (var j:int = 0; j
<cols; j ++){
			 rect.x = j * tileWidth;
			 rect.y = i * tileHeight;
			 tiles[tiles.length] = image.getPixels(rect);
			 rect.x += 25;
			 rect.y += 25;
			 sX[inc] = rect.x;
			 sY[inc] = rect.y;
			 locX[inc] = rX[inc] = -rect.width * 2
			 locY[inc] = rY[inc] =  Math.random() * stage.stageHeight;
			 setTimeout(startAnimation, inc *4 + 100, inc, rect.x, rect.y);
			 inc++;
		}
	}
	trace("getPixels",getTimer()-startTime,"ms");
	addEventListener(Event.ENTER_FRAME, onLoop);
}
function startAnimation(index:int, dx:Number, dy:Number):void{
	var interval:Number;
	var animate:Function = function(index:int):void{
		locX[index] += (dx - locX[index]) / 4;
		locY[index] += (dy - locY[index]) / 4;
		if (Math.abs(locX[index] - dx) <1 &#038;&#038; Math.abs(locY[index] - dy)<1){
			locX[index] = dx;
			locY[index] = dy;
			clearInterval(interval);
		}
	}
   interval = setInterval(animate, 32, index);
}
var canvas:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,false, 0xFFFFFF);
addChild(new Bitmap(canvas));
var loc:Point = new Point();

function onLoop(evt:Event):void {
	  canvas.fillRect(canvas.rect, 0xFFFFFF);
	  var startTime:Number = getTimer();
	  for (var i:int = 0; i<tiles.length; i++){
			tileRect.x = locX[i];
			tileRect.y = locY[i];
			canvas.setPixels(tileRect,tiles[i]);
			tiles[i].position = 0;
	  }
	  trace("setPixels",getTimer()-startTime,"ms");
}
</pre>
<p>a nice one, <strong>~ 17</strong> ms to extract and ~2ms to loop on my mac, faster than copyPixels but vectors are still leading...</p>
<p>Fourth strike: <strong>merge</strong></p>
<pre lang="actionscript">
[SWF(width=650, height=650)]
var loader:Loader = new Loader();
loader.load(new URLRequest("http://actionsnippet.com/wp-content/chair.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
var w:Number;
var h:Number;
var rows:Number = 20;
var cols:Number = 20;
var tiles:Vector.<BitmapData> = new Vector.<BitmapData>();
var locX:Vector.<Number> = new Vector.<Number>();
var locY:Vector.<Number> = new Vector.<Number>();
var rX:Vector.<Number> = new Vector.<Number>();
var rY:Vector.<Number> = new Vector.<Number>();
var sX:Vector.<Number> = new Vector.<Number>();
var sY:Vector.<Number> = new Vector.<Number>();
function onLoaded(evt:Event):void{
	w = evt.target.width;
	h = evt.target.height;
	var image:BitmapData = Bitmap(evt.target.content).bitmapData;
	var tileWidth:Number = w / cols;
	var tileHeight:Number = h / rows;
	var inc:int = 0;
	var pnt:Point = new Point();
	var rect:Rectangle = new Rectangle(0,0,tileWidth,tileHeight);
	var startTime:Number = getTimer();
	for (var i:int = 0; i<rows; i++){
		for (var j:int = 0; j
<cols; j ++){
			 var currTile:BitmapData= new BitmapData(tileWidth, tileHeight, true, 0x00000000);
			 rect.x = j * tileWidth;
			 rect.y = i * tileHeight;
			 currTile.merge(image,rect,pnt,0xFF,0xFF,0xFF,0xFF);
			 tiles[inc] = currTile;
			 rect.x += 25;
			 rect.y += 25;
			 sX[inc] = rect.x;
			 sY[inc] = rect.y;
			 locX[inc] = rX[inc] = -rect.width * 2
			 locY[inc] = rY[inc] =  Math.random() * stage.stageHeight;
			 setTimeout(startAnimation, inc *4 + 100, inc, rect.x, rect.y);
			 inc++;
		}
	}
	trace("merge",getTimer()-startTime,"ms");
	addEventListener(Event.ENTER_FRAME, onLoop);
}
function startAnimation(index:int, dx:Number, dy:Number):void{
	var interval:Number;
	var animate:Function = function(index:int):void{
		locX[index] += (dx - locX[index]) / 4;
		locY[index] += (dy - locY[index]) / 4;
		if (Math.abs(locX[index] - dx) <1 &#038;&#038; Math.abs(locY[index] - dy)<1){
			locX[index] = dx;
			locY[index] = dy;
			clearInterval(interval);
		}
	}
   interval = setInterval(animate, 32, index);
}
var canvas:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight,false, 0xFFFFFF);
addChild(new Bitmap(canvas));
var loc:Point = new Point();

function onLoop(evt:Event):void {
	  canvas.fillRect(canvas.rect, 0xFFFFFF);
	  var startTime:Number = getTimer();
	  for (var i:int = 0; i<tiles.length; i++){
			var tile:BitmapData= tiles[i];
			loc.x = locX[i];
			loc.y = locY[i];
			canvas.merge(tile, tile.rect, loc, 0xFF,0xFF,0xFF,0xFF);
	  }
	  trace("merge",getTimer()-startTime,"ms");
}
</pre>
<p><strong>~36</strong> ms to extract and ~12ms to merge tiles on the canvas!!!...too slow all the way...:\</p>
<p>There are still some methods left such as getPixel\setPixel, getPixel32\setPixel32, and copyChannel but they're a too much restrictive choice because they're handling one pixel, or channel at time therefore a further loop would be required to get them doing this task.</p>
<p>Summary:<br />
getVector\setVector : ~9ms\~1ms<br />
getPixels\setPixels: ~17ms\~2ms<br />
copyPixels: ~27ms\~2-3ms<br />
merge: ~36ms\~12ms</p>
<p>make your choice <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>NOTE: these benchmarks are valid from flash player 10 because we (both me and <a href="http://actionsnippet.com/?page_id=3">Zevan</a>) used the Vector native type to store lists of typed data. To make them valid for previous version of the player make sure to replace vectors with arrays and check other types are already supported by the target player.</p>
<p>stay tuned <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2009/07/15/bitmapdata-manipulation-benchmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My entry to Bit-101s 25 Lines competition</title>
		<link>http://www.flashfuck.it/2008/11/30/my-entry-to-bit-101s-25-lines-competition/</link>
		<comments>http://www.flashfuck.it/2008/11/30/my-entry-to-bit-101s-25-lines-competition/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 13:45:08 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[25lines]]></category>
		<category><![CDATA[contest]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=101</guid>
		<description><![CDATA[Yep, i made my submission to 25lines contest just few days ago (right in time ), so (as Sakri did some days before me) I&#8217;m publishing my code. It&#8217;s an easy terrain generator&#8230; Actually, I think it can be somehow improved both in lines of code and actual performances, so feel free to edit or [...]]]></description>
			<content:encoded><![CDATA[<p>Yep, i made my submission to <a href="http://www.25lines.com/" target="_blank">25lines contest</a> just few days ago (right in time <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), so (as <a href="http://www.sakri.net/blog/2008/11/19/my-entry-to-bit-101s-25-lines-competition/" target="_blank">Sakri did some days before me</a>) I&#8217;m publishing my code. It&#8217;s an easy terrain generator&#8230;</p>
<p><a href="http://www.flashfuck.it/wp-content/uploads/2008/11/25lines.jpg"></a></p>
<p style="text-align: center;"><a href="http://www.flashfuck.it/wp-content/uploads/2008/11/25linesbmpoptimized.swf" target="_blank"><img class="alignnone size-medium wp-image-102 aligncenter" title="25lines" src="http://www.flashfuck.it/wp-content/uploads/2008/11/25lines-300x300.jpg" alt="" width="300" height="300" /></a></p>
<p>Actually, I think it can be somehow improved both in lines of code and actual performances, so feel free to edit or tell me &#8220;you&#8217;d better to do that this other way&#8230;&#8221; <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What&#8217;s going on is:</p>
<ul>
<li>generate a shape filled with a gradient to create a reference color for differents &#8220;height&#8221;</li>
<li>generate a perlinNoise everyframe for dataprovider use</li>
<li>detect each perlinNoise pixel depth according with its main channel value (blue in this case..)</li>
<li>generating a vector of Bitmaps to be employed in the view</li>
</ul>
<pre lang="actionscript">/**
 * 25-Line ActionScript Contest Entry
 *
 * Project: Random Terrain 3D Generator
 * Author:  Piergiorgio Niero (aka pigiuz) piergiorgio.niero[at]gmail.com
 * Date:    11/24/08
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

// 3 free lines! Alter the parameters of the following lines or remove them.
// Do not substitute other code for the three lines in this section
[SWF(width=800, height=800, backgroundColor=0xffffff, frameRate=24)]
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
// 25 lines begins here!
var _bd:BitmapData = new BitmapData(50,50,false,0x0000FF);
var _points:Array = new Array(new Point());
var _vxCont:Sprite = Sprite(addChild(new Sprite));
_vxCont.x = _vxCont.y = 400;
var _vexels:Vector. = new Vector.((2500),true);
var _hMap:BitmapData = new BitmapData(255,1,false);
var _gradient:Shape = new Shape();
_gradient.graphics.beginGradientFill( GradientType.LINEAR,new Array( 0x4267F9, 0xF9EAB0, 0x9EF07D, 0x8DF273, 0x9D5E1E, 0xFFFFFF ),new Array( 1, 1, 1, 1, 1, 1 ),new Array( 90, 105, 110, 120, 145, 185 ),new Matrix(0.2456396484375,0,0,0.0006103524625,127.5,.5));
_gradient.graphics.drawRect(0,0,255,1);
_hMap.draw(_gradient);
addEventListener(Event.ENTER_FRAME,generatePerlinNoise);
function generatePerlinNoise(e:Event=null):void{
	_bd.perlinNoise(25,25,1,0,false,true,4,false,_points);
	Point(_points[0]).y+=1;
	for(var v:uint=0;v&amp;lt;(2500);v++){
		_vexels[v] = (_vexels[v]==null)?generateVoxel(v):_vexels[v];
		_vexels[v].y = Math.pow((_bd.getPixel(v%50,Math.floor((v/50))) &amp; 0xFF)/255*6,3)*24*.24;
		_vxCont.rotationX = mouseY*.1;
		_vxCont.rotationY = (_vxCont.rotationY-(90/stage.stageWidth*(mouseX-stage.stageWidth)+45))*.5;
		_vexels[v].bitmapData.floodFill(0,0,_hMap.getPixel(255-(_bd.getPixel(v%50,Math.floor((v/50))) &amp; 0xFF),0));}}
function generateVoxel(v:uint):Bitmap{
	var b:Bitmap = new Bitmap(new BitmapData(24*.5,24*.5,false,0x000000),"auto",false);
	b.x = v%50*24-(_bd.width*24*.5);
	b.z = Math.floor((v/50))*24-(_bd.height*24*.5);
	return Bitmap(_vxCont.addChild(b));}
// 25 lines ends here!

enjoy <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/11/30/my-entry-to-bit-101s-25-lines-competition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Stratus on Adobe Labs</title>
		<link>http://www.flashfuck.it/2008/11/19/adobe-stratus-on-adobe-labs/</link>
		<comments>http://www.flashfuck.it/2008/11/19/adobe-stratus-on-adobe-labs/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 09:36:01 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=99</guid>
		<description><![CDATA[Did you remember &#8220;Pacifica&#8221; project? Now it&#8217; [UPDATE: Adobe Stratus is a rendezvous service for RTMFP, a new protocol built in to Flash Player 10 and AIR 1.5. Neither RTMFP nor Stratus are related to the project codenamed Pacifica.] Something new is on adobe labs and its name is &#8220;Stratus&#8220;..WONDERFUL! Let&#8217;s explain what i&#8217;m talking [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: line-through;">Did you remember &#8220;<a href="http://blogs.adobe.com/pacifica/">Pacifica</a>&#8221; project? Now </span><span style="text-decoration: line-through;">it&#8217;</span> [UPDATE: Adobe Stratus is a rendezvous service for RTMFP, a new protocol built in to Flash Player 10 and AIR 1.5. Neither RTMFP nor Stratus are related to the project codenamed Pacifica.] Something new is on adobe labs and its name is &#8220;<a href="http://labs.adobe.com/wiki/index.php/Stratus">Stratus</a>&#8220;..WONDERFUL! <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.flashfuck.it/wp-content/uploads/2008/11/stratus_sample_app.png"><img class="alignnone size-full wp-image-100" title="stratus_sample_app" src="http://www.flashfuck.it/wp-content/uploads/2008/11/stratus_sample_app.png" alt="" width="456" height="558" /></a></p>
<p>Let&#8217;s explain what i&#8217;m talking about:</p>
<p><a href="http://labs.adobe.com/wiki/index.php/Stratus">Stratus</a> is &#8220;hosted rendezvous service that aids establishing communications between Flash Player endpoints&#8221;.<br />
This technology enables clients&#8217; flash player (10 +, or AIR 1.5) to connect directly each other to share runtime informations&#8230;actually <a href="http://en.wikipedia.org/wiki/Peer-to-peer">PEER TO PEER</a>!! (underline this: Stratus is a service by Adobe, not a technology to run on own servers).</p>
<p>Stratus does support only &#8220;end to end&#8221; p2p, multicast or swarming are not supported. This means we&#8217;re not enabled to create a new air-mule service over stratus, but we can build our p2p video chat, p2p real time games, etc&#8230;</p>
<p>Stratus introduces a new data transfer protocol: RTMFP, which uses UDP instead of clean RTMP which uses TCP. (note, RTMFP is not <a href="http://www.adobe.com/devnet/flashmediaserver/articles/overview_streaming_fms3_02.html">RTMP*</a>, which is the encrypted protocol for FMS).</p>
<p>Stratus is now beta, and you can test a <a href="http://labs.adobe.com/technologies/stratus/samples/">sample application hosted on the labs Stratus page</a>&#8230;</p>
<p>Stratus is going to be released next year (hopefully &#8220;early&#8221;) &#8230;it seems we&#8217;re going to have real time &#8220;anything&#8221; in few months <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>This could be a new red pill for our webapps,<br />
Stay tuned <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/11/19/adobe-stratus-on-adobe-labs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cows in chaos</title>
		<link>http://www.flashfuck.it/2008/10/06/cows-in-chaos/</link>
		<comments>http://www.flashfuck.it/2008/10/06/cows-in-chaos/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 13:18:43 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[Isometry]]></category>
		<category><![CDATA[MMOs]]></category>
		<category><![CDATA[Papervision 3D]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=94</guid>
		<description><![CDATA[I&#8217;m digging into MMOs, now testing papervision2 cow model (unfortunately i&#8217;m not a modeler, but i&#8217;m a pretty good thief ) and put it on my testing stage&#8230;here&#8217;s the result&#8230;40 COWS! quite good uh? Let me know how it runs on your machines Stay tuned]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m digging into MMOs, now testing <a href="http://www.papervision2.com">papervision2</a> cow model (unfortunately i&#8217;m not a modeler, but i&#8217;m a pretty good thief <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and put it on my testing stage&#8230;here&#8217;s the result&#8230;40 COWS! quite good uh? <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.flashfuck.it/test/pv3d_isometry_02" target="_blank"><img class="alignnone" src="http://farm4.static.flickr.com/3230/2918740228_b3c8f49e00.jpg?v=0" alt="cows! :D" /></a></p>
<p>Let me know how it runs on your machines <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Stay tuned <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/10/06/cows-in-chaos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MMO Test with Papervision3D + Flash Player 10</title>
		<link>http://www.flashfuck.it/2008/10/03/mmo-test-with-papervision3d-flash-player-10/</link>
		<comments>http://www.flashfuck.it/2008/10/03/mmo-test-with-papervision3d-flash-player-10/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 20:53:55 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash Player 10]]></category>
		<category><![CDATA[Isometry]]></category>
		<category><![CDATA[MMOs]]></category>
		<category><![CDATA[Papervision 3D]]></category>
		<category><![CDATA[PV3D]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=91</guid>
		<description><![CDATA[Here is my very first test on MMOs with Papervision3D on Flash Player 10 (needed to watch properly). here&#8217;s the link http://www.flashfuck.it/test/pv3d_isometry_01/ this is just the beginning&#8230;it has to be tuned and refined but, yes, it can be done PS: I stolen the model somewhere on the web&#8230;please if it is yours don&#8217;t offend yourself, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my very first test on MMOs with Papervision3D on Flash Player 10 (needed to watch properly).</p>
<p style="text-align: center;"><a title="pv3d_isometric_01" href="http://www.flashfuck.it/test/pv3d_isometry_01/"><img class="aligncenter" src="http://farm4.static.flickr.com/3190/2910715764_4d45e7ef03_m.jpg" alt="pv3d_isometric_01" /></a></p>
<p>here&#8217;s the link http://www.flashfuck.it/test/pv3d_isometry_01/</p>
<p>this is just the beginning&#8230;it has to be tuned and refined but, yes, it can be done <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>PS: I stolen the model somewhere on the web&#8230;please if it is yours don&#8217;t offend yourself, i stole it because it&#8217;s good <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  (anyway let me know so i can put your name somewhere <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/10/03/mmo-test-with-papervision3d-flash-player-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trace on a shell</title>
		<link>http://www.flashfuck.it/2008/08/30/trace-on-a-shell/</link>
		<comments>http://www.flashfuck.it/2008/08/30/trace-on-a-shell/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 14:09:28 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[flashtracer]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=80</guid>
		<description><![CDATA[Since it has been created i&#8217;ve been a fan of flash tracer extension, i really fell in love with that tool, but i noticed it slow down the browser and can even make it crash. So, let&#8217;s open a trace logger on our terminal&#8230; To do that the right command is &#8220;tail&#8221; which actually &#8220;[...]PrintÂ  [...]]]></description>
			<content:encoded><![CDATA[<p>Since it has been created i&#8217;ve been a fan of flash tracer extension, i really fell in love with that tool, but i noticed it slow down the browser and can even make it crash.</p>
<p>So, let&#8217;s open a trace logger on our terminal&#8230;</p>
<p>To do that the right command is &#8220;tail&#8221; which actually &#8220;<a href="http://lowfatlinux.com/linux-tail-manual.html" target="_blank">[...]PrintÂ  theÂ  last 10 lines of each FILE to standard output[...]</a>&#8221; and the file to open is located in /Users/[your username]/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt</p>
<p>Then, let&#8217;s do something good and useful with that:</p>
<p>open your TextEdit, cmd+shift+T to switch to plain text, write down this one line command:</p>
<p><code>tail -f /Users/[your username]/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt</code></p>
<p>save the file as &#8220;flashtracer.sh&#8221; and use sh as file extension instead of txt.</p>
<p>then right click on the file, reach the &#8220;open with&#8221; menu and choose &#8220;terminal&#8221; application located inside utility folder. Note: it would be great if you set terminal as default application to open that file <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ok, now everything&#8217;s ready; double click on flashtracer.sh and start tracing <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Note: remember you&#8217;re in a shell now, so you can clear up the lines with cmd+K&#8230;</p>
<p>I hope it can be useful,</p>
<p>byez <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/08/30/trace-on-a-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

