<?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</title>
	<atom:link href="http://www.flashfuck.it/category/flash/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>Flash Camp Milano 2011 &#8211; the day after</title>
		<link>http://www.flashfuck.it/2011/05/21/flash-camp-milano-2011-the-day-after/</link>
		<comments>http://www.flashfuck.it/2011/05/21/flash-camp-milano-2011-the-day-after/#comments</comments>
		<pubDate>Sat, 21 May 2011 08:46:08 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[FlashCamp]]></category>
		<category><![CDATA[Milan]]></category>
		<category><![CDATA[WhyMCA]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=206</guid>
		<description><![CDATA[Yesterday it has been a great day! Yesterday we had the FlashCamp here in Milan, hosted by WhyMCA mobile conference (thanks guys). Lots of fun, lots of people (450 nerds) from the most different beliefs (html5ers, javascripters, objective-Cers, androiders, whateverers ), a great happening to spread the word about what you can do with the [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday it has been a great day!<br />
Yesterday we had the FlashCamp here in Milan, hosted by <a href="http://www.whymca.org/">WhyMCA</a> mobile conference (thanks guys).</p>
<p><img class="size-medium wp-image-208 aligncenter" title="whymca-logo" src="http://www.flashfuck.it/wp-content/uploads/2011/05/whymca-logo-300x255.png" alt="Flash Camp at WhyMCA" width="300" height="255" /></p>
<p>Lots of fun, lots of people (450 nerds) from the most different beliefs (html5ers, javascripters, objective-Cers, androiders, whateverers <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), a great happening to spread the word about what you can do with the flash platform and how it can ease your work when deploying on mobile devices.<br />
Thanks to Adobe we even had a welcome guest: <a href="http://corlan.org/">Mihai Corlan</a>, who presented very cool new stuff putting his hands on Flex Builder 4.5 and the Flex Hero SDK.<br />
Moreover it has been totally the best possible way to meet other people from the community of Milan, <a href="http://theflashmind.com/">TheFlashMind</a>, and to spread the word about our cool AUG <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I really enjoyed the FlashCamp, it has been a pretty unique conference in Italy and it has been even more successful than we expected.<br />
As the camp was in &#8220;Eataly&#8221; we had an Eatalian FlashCamp party at the end, a cool way to make developers meet each other and to make them drunk <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Someone <a href="http://twitter.com/#!/BrunoFonzi/status/71630157114376192">even twitted that it was the best part of the FlashCamp in Milan</a> <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Last but not least: my friend <a href="http://lucamezzalira.com/">Luca </a>already uploaded <a href="http://www.flickr.com/photos/lucamezzalira/sets/72157626766575326/">some pics to his flickr account</a>.</p>
<p>See you at the next camp <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/2011/05/21/flash-camp-milano-2011-the-day-after/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at WebTechCon Italy &#8211; 9-10 November 2010 &#8211; Milano</title>
		<link>http://www.flashfuck.it/2010/10/06/speaking-at-webtechcon-italy-9-10-november-2010-milano/</link>
		<comments>http://www.flashfuck.it/2010/10/06/speaking-at-webtechcon-italy-9-10-november-2010-milano/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 08:08:18 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[The Flash Mind]]></category>
		<category><![CDATA[WebTechCon]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=179</guid>
		<description><![CDATA[!!!ONE MORE UPDATE!!! I&#8217;ll be speaking The session will be &#8220;Flash graphics unleashed&#8221;. 30 mins to dig into flash graphics capabilities. See you there ciao !!!UPDATE!!! Some work appointments came through and I&#8217;ll not be able to be back for WebTech :\ But don&#8217;t worry! there&#8217;s a HUUUUGE &#8220;replacement&#8221;, Sandro Ducceschi from SFUG has took [...]]]></description>
			<content:encoded><![CDATA[<p><strong>!!!ONE MORE UPDATE!!!</strong><br />
I&#8217;ll be speaking <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The session will be &#8220;Flash graphics unleashed&#8221;. 30 mins to dig into flash graphics capabilities.<br />
See you there<br />
ciao
</p>
<p><strong>!!!UPDATE!!!</strong><br />
Some work appointments came through and I&#8217;ll not be able to be back for WebTech :\<br />
But don&#8217;t worry! there&#8217;s a HUUUUGE &#8220;replacement&#8221;, <a href="http://blog.swfjunkie.com/">Sandro Ducceschi</a> from <a href="http://www.sfug.ch/">SFUG</a> has took over my slots! <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
so guys, have fun, I&#8217;ll be there with my soul <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Yup, back on stage <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ll be speaker at <a href="http://webtechcon.it" target="_blank">WebTechCon Italy</a>, it&#8217;s the first year for this German conference in Italy and there are a HUGE amount of good reasons for you to come.</p>
<p style="text-align: center;"><a href="http://webtechcon.it/" target="_blank"><img class="size-full wp-image-190 aligncenter" title="webteckspeakbutton" src="http://www.flashfuck.it/wp-content/uploads/2010/08/webteckspeakbutton.gif" alt="" width="150" height="100" /></a></p>
<p>First of all it&#8217;s not all about flash!! There are 5 main tracks: webtech, flash day, silverlight day, javascript day and php4 frontend day&#8230; yes, &#8220;day&#8221; is not to be intended as &#8220;whole day&#8221; but much more as &#8220;track&#8221;.</p>
<p>It&#8217;s a good opportunity to put an eye on what&#8217;s going on on the html5 or silverlight fields and learn something new.</p>
<p>On the flashy side there are a bunch of well known and surely attractive speakers:</p>
<p><a href="http://lucamezzalira.com/" target="_blank">Luca Mezzalira</a> ,<a href="http://interpreting.it/" target="_blank">Andrea Trento</a> ,<a href="http://casario.blogs.com/" target="_blank">Marco Casario</a> &#8230;I&#8217;m sure you all know what those guys are known for&#8230; then&#8230; well&#8230;. there&#8217;s me <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Further, it&#8217;s a good way to meet other guys from <a href="http://groups.google.it/group/theflashmind---adobe-flash-platform-user-group---italy" target="_blank">TheFlashMind AUG</a> <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I&#8217;ll be <a href="http://webtechcon.it/2010/speaker/#5389" target="_blank">speaking</a> twice on flash graphics and pureMVC.</p>
<p>Be sure you buy a ticket and come, one month&#8217;s left, then&#8230; rock n roll</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2010/10/06/speaking-at-webtechcon-italy-9-10-november-2010-milano/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install Flash Switcher extension on unsupported versions of Firefox</title>
		<link>http://www.flashfuck.it/2010/08/12/install-flash-switcher-extension-on-unsupported-versions-of-firefox/</link>
		<comments>http://www.flashfuck.it/2010/08/12/install-flash-switcher-extension-on-unsupported-versions-of-firefox/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 10:28:37 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=181</guid>
		<description><![CDATA[Today I had to install the must-have flash switcher extension for firefox (by Alessandro Crugnola) and I found that it&#8217;s not compatible with firefox versions after 3.0 &#8230; I trust in sephiroth&#8217;s extension going to work properly even in unsupported firefox versions, and however it&#8217;s worth the attempt, so, how to install it anyway? First [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to install the must-have <a href="https://addons.mozilla.org/en-US/firefox/addon/5044/">flash switcher extension for firefox</a> (by <a href="http://www.sephiroth.it/">Alessandro Crugnola</a>) and I found that it&#8217;s not compatible with firefox versions after 3.0 &#8230;</p>
<p>I trust in sephiroth&#8217;s extension going to work properly even in unsupported firefox versions, and however it&#8217;s worth the attempt, so, how to install it anyway?</p>
<p style="text-align: center;"><img class="size-medium wp-image-182 aligncenter" title="ffflsh" src="http://www.flashfuck.it/wp-content/uploads/2010/08/ffflsh-300x157.png" alt="" width="300" height="157" /></p>
<p>First of all, download the flash switcher extension from the mozilla addons site ( https://addons.mozilla.org/en-US/firefox/addon/5044/ ) and save it on your hard drive.</p>
<p>Now that you have the .xpi file rename it to .zip and decompress it, you&#8217;re getting a <em>plugin</em> and <em>content</em> folders, <em>chrome.manifest</em> and <em>install.rdf</em> files.</p>
<p>Open install.rdf with a text editor and examine this tag</p>
<pre lang="xml">
<RDF:Description RDF:about="rdf:#$uFrJ3"
                   em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
                   em:minVersion="3.0a1"
                   em:maxVersion="3.0pre" />
</pre>
<p>here min and max versions are defined for the extension, so just change em:maxVersion from 3.0pre to 3.8 (or whatever) and save the file.</p>
<p>Now select all files and folders (not the parent folder!!!) (plugin, content, chrome.manifest, install.rdf) and zip all together, then change the extension from .zip to .xpi.</p>
<p>Open firefox, File>Open, browse to the .xpi file, install&#8230; done and working!! w00t! <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>My unsupported (but properly working) version of firefox is 3.6.8, the flash switcher extension version is 2.0.2.</p>
<p>enjoy <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/08/12/install-flash-switcher-extension-on-unsupported-versions-of-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at IGDA Switzerland 25th february 2010</title>
		<link>http://www.flashfuck.it/2010/02/08/speaking-at-igda-switzerland-25th-february-2010/</link>
		<comments>http://www.flashfuck.it/2010/02/08/speaking-at-igda-switzerland-25th-february-2010/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 09:25:56 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[igda]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=172</guid>
		<description><![CDATA[I&#8217;ll be speaking at IGDA Switzerland in Bern in few weeks, a great opportunity for me to talk about the Flash Platform as a gaming platform, to share the experience I had making the engine of Wazzamba and to meet new people I only &#8220;met&#8221; in twitter or in their blogs The meeting will take [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be speaking at <a href="http://www.igda.ch">IGDA Switzerland</a> in Bern in few weeks,<br />
<img src="http://www.igda.org/sites/all/themes/igda_black/logo.png" alt="Piergiorgio Niero IGDA Switzerland" /><br />
a great opportunity for me to talk about the Flash Platform as a gaming platform, to share the experience I had making the engine of <a href="http://www.wazzamba.com">Wazzamba</a> and to meet new people I only &#8220;met&#8221; in twitter or in their blogs <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The meeting will take place in february 25th at &#8220;<a href="http://www.nothing.ch/">Nothing</a>&#8221; (great name guys <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) hq in Wabern, you can find more info <a href="http://www.igda.ch/archives/225">here in IGDA Switzerland blog</a>.<br />
See you there <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/2010/02/08/speaking-at-igda-switzerland-25th-february-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My FOTB &#8217;09 Schedule</title>
		<link>http://www.flashfuck.it/2009/09/07/my-fotb-09-schedule/</link>
		<comments>http://www.flashfuck.it/2009/09/07/my-fotb-09-schedule/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 07:35:15 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[fotb09]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=159</guid>
		<description><![CDATA[Flash on the beach is each day closer and I started to plan my own schedule. Each choice has been quite hard because of the high quality the conference is offering, the good thing is that even if I&#8217;m not 100% convinced to be attending some sessions I&#8217;m sure that I can switch to another [...]]]></description>
			<content:encoded><![CDATA[<p>Flash on the beach is each day closer and I started to plan my own schedule.<br />
Each choice has been quite hard because of the high quality the conference is offering, the good thing is that even if I&#8217;m not 100% convinced to be attending some sessions I&#8217;m sure that I can switch to another one with the same or even higher quality <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>sunday:<br />
papervision3D workshop by seb lee-delisle</p>
<p>monday:<br />
Richard exposes all! &#8211; Richard Galvan<br />
Casual game architecture &#8211; Keith Peters<br />
Visualizing the voice &#8211; Chuck Freedman<br />
Who&#8217;s a bright spark then! &#8211; Mike Jones<br />
Cybernetic art revsited &#8211; Dr. Woohoo!<br />
Telling Stories â€“ Hillman Curtis<br />
Epiphany â€“ Joel Gethin Lewis</p>
<p>tuesday:<br />
3 minute wonders &#8211; many (looking forward to Michiel van der Ros 3D optimization for MMOs)<br />
Quick as a Flash &#8211; Grant Skinner<br />
Leaving the sandbox &#8211; Joa Ebert<br />
Application Frameworks &#8211; Richard Lord<br />
More than bending pixels &#8211; Paul Burnett<br />
Unconventional Webapps &#8211; Des Traynor + Eoghan McCabe<br />
Choose your own adventure &#8211; Craig Swann</p>
<p>wednesdey<br />
Play with vectors &#8211; Koen de Weggheleire<br />
Connecting the dots &#8211; Mario Klingemann<br />
Work/Play &#8211; Seb Lee-Delisle<br />
Flashed Fashion &#8211; Andy Mcdonald<br />
Research realtime graphics &#8211; Ralph Hauwert<br />
Space &#8211; Joshua Davis</p>
<p>I&#8217;m getting in Brighton on saturday 19th, you&#8217;re allowed to <a href="http://twitter.com/pigiuz">poke me</a> <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/2009/09/07/my-fotb-09-schedule/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>Flash Player 10 API docs ready for download</title>
		<link>http://www.flashfuck.it/2008/05/22/flash-player-10-api-docs-ready-for-download/</link>
		<comments>http://www.flashfuck.it/2008/05/22/flash-player-10-api-docs-ready-for-download/#comments</comments>
		<pubDate>Thu, 22 May 2008 20:09:47 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2008/05/22/flash-player-10-api-docs-ready-for-download/</guid>
		<description><![CDATA[Here&#8217;s the link to download Astro&#8217;s API documentation: http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_as3langref_052008.zip At this time it&#8217;s only available for download, not for online consultation.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the link to download Astro&#8217;s API documentation: <a href="http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_as3langref_052008.zip">http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_as3langref_052008.zip</a></p>
<p>At this time it&#8217;s only available for download, not for online consultation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/05/22/flash-player-10-api-docs-ready-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash player 10 available on Adobe Labs</title>
		<link>http://www.flashfuck.it/2008/05/16/flash-player-10-available-on-adobe-labs/</link>
		<comments>http://www.flashfuck.it/2008/05/16/flash-player-10-available-on-adobe-labs/#comments</comments>
		<pubDate>Fri, 16 May 2008 00:35:44 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2008/05/16/flash-player-10-available-on-adobe-labs/</guid>
		<description><![CDATA[It&#8217;s time to upgrade! Astro is here! Let&#8217;s take a look to what chefs cooked up for our taste pleasure: 3D support: finally adobe put some z in flash!:D on astro release notes Adobe&#8217;s claiming that they&#8217;re enabling everyone to create complex 3D effects using simple code&#8230; mmm&#8230; i&#8217;m curious about that! i&#8217;m a papervisioned [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time to upgrade! <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Astro is <a href="http://labs.adobe.com/technologies/flashplayer10/">here</a>!</p>
<p style="text-align: center"><img src="http://www.flashfuck.it/wp-content/uploads/2008/05/flashplayer10_demo_nofl_557x475.jpg" alt="flashplayer10_demo_nofl_557âˆšÃ³475.jpg" /></p>
<p>Let&#8217;s take a look to what chefs cooked up for our taste pleasure:</p>
<ol>
<li>3D support: finally adobe put some z in flash!:D on astro release notes Adobe&#8217;s claiming that they&#8217;re enabling everyone to create complex 3D effects using simple code&#8230; mmm&#8230; i&#8217;m curious about that! i&#8217;m a papervisioned guy! <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li>hardware acceleration: flash player 9.0.115 introduced hardware acceleration&#8230; astro is becoming even friendlier with your gpu. Now flash player supports GPU compositing and blitting, both parameters must be enabled by html.</li>
<li>Adobe Pixel Bender: formerly Hydra (which was a cooler name <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), this system let us create our own custom filters and apply them runtime..</li>
<li>New text engine! Multiple columns text, support for chinese (GB18030 )</li>
<li><a href="http://speex.org/">Speex</a>! a free codec used to encode speech&#8230;.Ribbit thanx while pacifica voip project is waiting&#8230;</li>
<li>Dynamic sound generation!&#8230;AndrâˆšÂ© Michelle&#8217;s &#8220;<a href="http://www.make-some-noise.info/">Adobe make some noise</a>&#8221; petition really made some noise! <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li>File reference runtime access! Finally we don&#8217;t have to upload our files to manipulate them inside our RIAs! Files are handled as ByteArrays so we can do quite everything <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li><a href="http://labs.adobe.com/technologies/flashplayer10/releasenotes.html">Many others&#8230;</a></li>
</ol>
<p>Another impressive innovation is Astro is available for Ubuntu Linux users too&#8230;so even penguins can try new features shown in the <a href="http://labs.adobe.com/technologies/flashplayer10/demos/">demo on labs site</a>.</p>
<p>Finally the coolest news: <a href="http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x">WE ALREADY  CAN COMPILE CONTENT TARGETING ASTRO</a>!</p>
<p>I&#8217;m so excited i don&#8217;t need <a href="http://www.thinkgeek.com/caffeine/drinks/a273/">mana </a>to stay awake tonight!:D</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/05/16/flash-player-10-available-on-adobe-labs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gradient Masking &#8211; La sfumatura nelle maschere</title>
		<link>http://www.flashfuck.it/2008/01/06/gradient-masking-la-sfumatura-nelle-maschere/</link>
		<comments>http://www.flashfuck.it/2008/01/06/gradient-masking-la-sfumatura-nelle-maschere/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 00:23:46 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2008/01/06/gradient-masking-la-sfumatura-nelle-maschere/</guid>
		<description><![CDATA[Questo âˆšÂ® uno &#8220;microtutorial&#8221; piuttosto semplice sulle maschere (sono 2 linee di codice -.-) che perâˆšâ‰¤ ho notato non essere troppo conosciuto. Come creare un effetto &#8220;pila&#8221; o &#8220;occhio di bue&#8221;? o piâˆšÏ€ banalmente, come creare una maschera sfumata con flash8 o superiori? crea un movieclip da mascherare crea un altro movieclip contenente una forma [...]]]></description>
			<content:encoded><![CDATA[<p>Questo âˆšÂ® uno &#8220;microtutorial&#8221; piuttosto semplice sulle maschere (sono 2 linee di codice -.-) che perâˆšâ‰¤ ho notato non essere troppo conosciuto.</p>
<p>Come creare un effetto &#8220;pila&#8221; o &#8220;occhio di bue&#8221;? o piâˆšÏ€ banalmente, come creare una maschera sfumata con flash8 o superiori?</p>
<ol>
<li>crea un movieclip da mascherare</li>
<li>crea un altro movieclip contenente una forma con riempimento a gradiente nel quale almeno un colore abbia alpha minore di 100</li>
<li>posiziona nello stage (fisicamente o via actionscript) i due clip: il mascherato e la maschera</li>
<li>via actionscript imposta a true la proprietâˆšâ€  &#8220;cacheAsBitmap&#8221; di ciascun movieclip</li>
<li>sempre via actionscript imposta la maschera del movieclip da mascherare (setMask in AS2 o mask in AS3)</li>
</ol>
<p>ecco il risultato:<br />
[flash http://www.flashfuck.it/wp-content/uploads/2008/01/maschere_sfumate1.swf w=400 h=200]</p>
<p>questo il fla dell&#8217;esempio (CS3) <a href='http://www.flashfuck.it/wp-content/uploads/2008/01/maschere_sfumate_flasfuckit.zip' title='maschere_sfumate_flasfuckit.zip'>Download Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/01/06/gradient-masking-la-sfumatura-nelle-maschere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

