<?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>Undolog.com &#187; Flash</title>
	<atom:link href="http://www.undolog.com/category/sviluppo/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.undolog.com</link>
	<description>Research &#38; Development  Blog</description>
	<lastBuildDate>Thu, 18 Mar 2010 14:23:31 +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>Commodore 64 Javascript emulator</title>
		<link>http://www.undolog.com/2010/01/06/commodore-64-javascript-emulator/</link>
		<comments>http://www.undolog.com/2010/01/06/commodore-64-javascript-emulator/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:18:38 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ActionScript-3.0]]></category>
		<category><![CDATA[Adobe-Flash]]></category>
		<category><![CDATA[Commodore-64]]></category>
		<category><![CDATA[emulatori]]></category>
		<category><![CDATA[Porting]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2788</guid>
		<description><![CDATA[Un po&#8217; di tempo fa avevo segnalato la versione di un emulatore Commodore 64 scritto in Adobe Actionscript 3.0, oggi in una nuova versione:

Adesso è possibile apprezzare il porting della versione Adobe Flash in Javascript:

Sicuramente più lenta della sua controparte in Flash, questa versione in javascript si avvale di jQuery e, di fatto, ne diventa [...]]]></description>
			<content:encoded><![CDATA[<p>Un po&#8217; di tempo fa avevo <a href="http://www.undolog.com/2007/03/02/commodore-64-web-emulator/">segnalato</a> la versione di un emulatore <strong>Commodore 64</strong> scritto in <strong>Adobe Actionscript 3.0</strong>, oggi in una <a target="_blank" href="http://codeazur.com.br/stuff/fc64_final/">nuova versione</a>:</p>
<p class="center"><a target="_blank" class="notarget" href="http://codeazur.com.br/stuff/fc64_final/"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-06-a-00.00.101.png" alt="Commodore 64 Emulator in Adobe Flash" title="Commodore 64 Emulator in Adobe Flash"  /></a></p>
<p>Adesso è possibile apprezzare il porting della versione Adobe Flash in <strong><a target="_blank" href="http://www.kingsquare.nl/jsc64">Javascript</a></strong>:<br />
<a target="_blank" class="notarget" href="http://www.kingsquare.nl/jsc64"><img src="http://www.undolog.com/wp-content/uploads/2010/01/Schermata-2010-01-05-a-23.59.531.png" alt="Commodore 64 Emulator in Javascript" title="Commodore 64 Emulator in Javascript" /></a><br />
Sicuramente più lenta della sua controparte in Flash, questa versione in javascript si avvale di <a target="_blank" href="http://jquery.com">jQuery</a> e, di fatto, ne diventa un&#8217;estensione per non dire Plugin <img src='http://www.undolog.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (assai riduttivo). Buon divertimento&#8230;</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;bodytext=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;notes=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;t=Commodore%2064%20Javascript%20emulator" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;annotation=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Commodore%2064%20Javascript%20emulator%20-%20http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Commodore%2064%20Javascript%20emulator&amp;story=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Commodore%2064%20Javascript%20emulator&amp;body=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Commodore%2064%20Javascript%20emulator&amp;link=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;headline=Commodore%2064%20Javascript%20emulator&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Un%20po%27%20di%20tempo%20fa%20avevo%20segnalato%20la%20versione%20di%20un%20emulatore%20Commodore%2064%20scritto%20in%20Adobe%20Actionscript%203.0%2C%20oggi%20in%20una%20nuova%20versione%3A%0D%0A%0D%0A%0D%0AAdesso%20%C3%A8%20possibile%20apprezzare%20il%20porting%20della%20versione%20Adobe%20Flash%20in%20Javascript%3A%0D%0A%0D%0ASicuramente%20pi%C3%B9%20le" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;t=Commodore%2064%20Javascript%20emulator" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Commodore%2064%20Javascript%20emulator&amp;url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F&amp;title=Commodore%2064%20Javascript%20emulator" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2010%2F01%2F06%2Fcommodore-64-javascript-emulator%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/actionscript-3-0/" title="ActionScript-3.0" rel="tag">ActionScript-3.0</a>, <a href="http://www.undolog.com/tag/adobe-flash/" title="Adobe-Flash" rel="tag">Adobe-Flash</a>, <a href="http://www.undolog.com/tag/commodore-64/" title="Commodore-64" rel="tag">Commodore-64</a>, <a href="http://www.undolog.com/tag/emulatori/" title="emulatori" rel="tag">emulatori</a>, <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/jquery-javascript-internet-sviluppo/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.undolog.com/tag/porting/" title="Porting" rel="tag">Porting</a>, <a href="http://www.undolog.com/category/software/" title="Software" rel="tag">Software</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/03/14/emulatore-assembler-6502/" title="Emulatore Assembler 6502 (14 marzo, 2007)">Emulatore Assembler 6502</a> (3)</li>
	<li><a href="http://www.undolog.com/2007/03/02/commodore-64-web-emulator/" title="Commodore 64 Web Emulator (2 marzo, 2007)">Commodore 64 Web Emulator</a> (4)</li>
	<li><a href="http://www.undolog.com/2007/03/05/codice-per-commodore-64/" title="Codice per Commodore 64 (5 marzo, 2007)">Codice per Commodore 64</a> (5)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/04/10/unobtrusive-flash-objects/" title="Unobtrusive Flash Objects (10 aprile, 2007)">Unobtrusive Flash Objects</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2010/01/06/commodore-64-javascript-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Flash CS4: creare un Ajax Loader o Activity Indicator</title>
		<link>http://www.undolog.com/2009/11/04/adobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator/</link>
		<comments>http://www.undolog.com/2009/11/04/adobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 14:19:44 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Flash CS4]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Activity Indicator]]></category>
		<category><![CDATA[Adobe Flash CS4]]></category>
		<category><![CDATA[Ajax Loader]]></category>
		<category><![CDATA[PNG]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2595</guid>
		<description><![CDATA[Creare un Ajax Loader (o Activity indicator per chi è ormai abituato ad usare l'Apple iPhone) per il Web non è una cosa difficile: esistono servizi che generano immagini gif animate di tutti i tipi. Tuttavia il formato GIF ha il grosso difetto di non supportare le trasparenze come si deve. La trasparenza, nel formato [...]]]></description>
			<content:encoded><![CDATA[<p>Creare un <strong>Ajax Loader</strong> (o <strong>Activity indicator</strong> per chi è ormai abituato ad usare l'Apple iPhone) per il Web non è una cosa difficile: esistono <a href="http://www.ajaxload.info/" target="_blank">servizi che generano immagini gif animate</a> di tutti i tipi. Tuttavia il formato GIF ha il grosso difetto di non supportare le trasparenze come si deve. La trasparenza, nel formato GIF attuale, coinvolge un solo piano di bit con la conseguenza che se non abbiamo un colore di sfondo uniforme, i bordi dell'immagine risultano notevolmente sgranati e frammentati.<br />
L'animazione mostrata qui sotto è stata realizzata impostando come colore di trasparenza il bianco.</p>
<p class="center"><img title="ajax-loader" src="/wp-content/uploads/2009/11/ajax-loader.gif" alt="ajax-loader" width="16" height="16" /></p>
<p>Quindi se lo sfondo è bianco (o un colore simile) non ci sono problemi. Al contrario, appena sostituiamo lo sfondo, ecco cosa accade:</p>
<div style="margin: 0pt auto; background: #000000 none repeat scroll 0% 0%; text-align: center; width: 48px; height: 48px;"><img style="margin-top:16px" title="ajax-loader" src="/wp-content/uploads/2009/11/ajax-loader.gif" alt="ajax-loader" width="16" height="16" /></div>
<p>In attesa, quindi, della diffusione del formato <a href="http://animatedpng.com/" target="_blank">APNG</a> (Animated PNG) - che supporterà un vero e proprio canale alpha per le trasparenze, importare GIF animati in contesti come Adobe Flash risulta "graficamente" una pessima scelta. Ecco allora come realizzare un'animazione in Adobe Flash del tutto simile a quelle presenti sul Web.</p>
<h4>Costruiamo il nostro Ajax Loader in Adobe Flash: il "petalo"</h4>
<p>Prima di tutto creiamo un MovieClip vuoto (o se preferite potete lavorare direttamente sullo stage) e disegnamo una linea verticale nera, il nostro petalo, alta 60/70 pixel per comodità, impostando uno spessore (tratto) di 10:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-1.png" alt="Ajax Loader in Adobe Flash" width="63" height="113" /></p>
<p>Selezioniamo la nostra linea e trasformiamola temporaneamente in un oggetto immagine (F8). Dal pannello <strong>Allinea</strong>, centriamola nello stage. Adesso duplichiamo (CTRL+D o CMD+D) la nostra linea, centriamo la linea duplicata e ruotiamola dal pannello <strong>Trasforma</strong> di 30 gradi:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-18.png" alt="Ajax Loader in Adobe Flash" /> <img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-2.png" alt="Ajax Loader in Adobe Flash" width="103" height="102" /></p>
<p>Ripetiamo questa operazione (duplica, centra, ruota di 30 gradi) fino ad ottenere:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-3.png" alt="Ajax Loader in Adobe Flash" width="116" height="109" /></p>
<p>Selezioniamo tutta l'immagine, cioè la somma degli oggetti:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-4.png" alt="Ajax Loader in Adobe Flash" width="113" height="110" /></p>
<p>Dal menu <strong>Elabora</strong> selezionate <strong>Dividi</strong> (CTRL+B o CMD+B):</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-5.png" alt="Ajax Loader in Adobe Flash" width="113" height="108" /></p>
<p>Poi, sempre dal menu Elabora, selezionate <strong>Forma</strong> &gt; <strong>Converti linee in riempimenti</strong>. In questo modo abbiamo ottenuto una figura "unica".</p>
<p>Adesso dobbiamo "bucare" il centro della nostra immagine. Per fare questo aumentate un po' lo <strong>zoom</strong> (tipo 400). Create un <strong>nuovo livello</strong> e proteggiamo quello con il lavoro svolto fino adesso:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-7.png" alt="Ajax Loader in Adobe Flash" width="228" height="74" /></p>
<p>Su questo nuovo livello potremmo lavorare in tranquillità, senza danneggiare l'altra nostra immagine. Disegniamo, partendo dal centro (mantenete premuto il tasto <strong>ALT</strong> insieme al tasto maiuscole <strong>SHIFT</strong>) un cerchio rosso senza bordo:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-8.png" alt="Ajax Loader in Adobe Flash" width="355" height="361" /></p>
<p>Nella figura qui sopra ho impostato la trasparenza del cerchio per evidenziare la sua posizione rispetto alla nostra figura (che si trova sul livello sottostante). Notate che ho appositamente "tagliato" gli spigoli dove si congiungono i "petali" della nostra figura. Il cerchio, quindi, dev'essere della giusta grandezza, cosa che ci tornerà comoda più avanti. Fatto questo selezionate il cerchio, copiatelo (CTRL+C o CMD+C) ed eliminate pure l'ultimo livello creato, sbloccate il livello con la nostra figura, e incollate!</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-9.png" alt="Ajax Loader in Adobe Flash" width="206" height="230" /></p>
<p>Cliccate adesso sul bianco dello stage in modo da deselezionare il cerchio rosso. Ora abbiamo "fuso" i nostri due oggetti. Selezionate nuovamente il cerchio rosso ed eliminatelo!</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-11.png" alt="Ajax Loader in Adobe Flash" width="215" height="205" /></p>
<p>Ottimo! Adesso selezioniamo tutto il nostro oggetto e cambiamogli colore con un grigio chiaro:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-12.png" alt="Ajax Loader in Adobe Flash" width="197" height="185" /></p>
<p>Selezioniamo poi il primo petalo (ore 12) e impostiamolo a nero (voi ovvimente potete scegliere la gradazione di colori che preferite):</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-13.png" alt="Ajax Loader in Adobe Flash" /></p>
<p>Impostiamo ora il secondo petalo (ore 13) ad un grigio scuro:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-14.png" alt="Ajax Loader in Adobe Flash" /></p>
<p>Proseguiamo per gli altri due petali (scegliete vuoi quanta gradazione applicare) fino ad ottenere:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-15.png" alt="Ajax Loader in Adobe Flash" /></p>
<h4>L'animazione</h4>
<p>Perfetto, ci siamo quasi, l'ultimo sforzo richiesto è creare la rotazione. Questa non deve riguardare i petali ma solo il colore. Per fare questo avremmo potuto procedere anche in altri modi (vedi ad esempio con luso delle maschere...), tuttavia questo mi sembra più semplice. Spostiamoci di qualche fotogramma avanti, tipo al 5 e inseriamo un <strong>Fotogramma chiave</strong>.</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-16.png" alt="Ajax Loader in Adobe Flash" /></p>
<p>Da pannello <strong>Trasforma</strong> ruotiamo la nostra immagine di 30 gradi, gli stessi gradi utilizzati durante la creazione dei nostri "petali". Ripetiamo questa operazione (inserimento Fotogramma chiave e rotazione di 30 gradi) mantenedo sempre costanti in numero di fotogrammi tra una chiave e un'altra, fino ad ottenere:</p>
<p class="center"><img style="border:1px solid #aaa" title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/Immagine-19.png" alt="Ajax Loader in Adobe Flash" /></p>
<p>Finito! Il nostro <strong>Ajax Loader in Adobe Flash</strong> è terminato! Ecco qui sotto la versione GIF esportata da Flash.</p>
<p class="center"><img title="Ajax Loader in Adobe Flash" src="/wp-content/uploads/2009/11/aaaa1.gif" alt="Ajax Loader in Adobe Flash" width="80" height="80" /></p>
<p>Qui sotto il filmato Flash con uno sfondo in movimento (notate che non ci sono distorzioni o sgranature):<br />

<object width="80" height="80">
<param name="movie" value="/wp-content/uploads/2009/11/ajax-loader.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#000000"></param>
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="80" height="80" src="/wp-content/uploads/2009/11/ajax-loader.swf" quality="high" bgcolor="#000000" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
<br />
<a href="/wp-content/uploads/2009/11/ajax-loader.fla.zip">Il sorgente</a> <img src='http://www.undolog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;bodytext=Creare%20un%20Ajax%20Loader%20%28o%20Activity%20indicator%20per%20chi%20%C3%A8%20ormai%20abituato%20ad%20usare%20l%27Apple%20iPhone%29%20per%20il%20Web%20non%20%C3%A8%20una%20cosa%20difficile%3A%20esistono%20servizi%20che%20generano%20immagini%20gif%20animate%20di%20tutti%20i%20tipi.%20Tuttavia%20il%20formato%20GIF%20ha%20il%20grosso%20difetto%20di%20n" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;notes=Creare%20un%20Ajax%20Loader%20%28o%20Activity%20indicator%20per%20chi%20%C3%A8%20ormai%20abituato%20ad%20usare%20l%27Apple%20iPhone%29%20per%20il%20Web%20non%20%C3%A8%20una%20cosa%20difficile%3A%20esistono%20servizi%20che%20generano%20immagini%20gif%20animate%20di%20tutti%20i%20tipi.%20Tuttavia%20il%20formato%20GIF%20ha%20il%20grosso%20difetto%20di%20n" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;t=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;annotation=Creare%20un%20Ajax%20Loader%20%28o%20Activity%20indicator%20per%20chi%20%C3%A8%20ormai%20abituato%20ad%20usare%20l%27Apple%20iPhone%29%20per%20il%20Web%20non%20%C3%A8%20una%20cosa%20difficile%3A%20esistono%20servizi%20che%20generano%20immagini%20gif%20animate%20di%20tutti%20i%20tipi.%20Tuttavia%20il%20formato%20GIF%20ha%20il%20grosso%20difetto%20di%20n" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;headline=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Creare%20un%20Ajax%20Loader%20%28o%20Activity%20indicator%20per%20chi%20%C3%A8%20ormai%20abituato%20ad%20usare%20l%27Apple%20iPhone%29%20per%20il%20Web%20non%20%C3%A8%20una%20cosa%20difficile%3A%20esistono%20servizi%20che%20generano%20immagini%20gif%20animate%20di%20tutti%20i%20tipi.%20Tuttavia%20il%20formato%20GIF%20ha%20il%20grosso%20difetto%20di%20n" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;t=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F&amp;title=Adobe%20Flash%20CS4%3A%20creare%20un%20Ajax%20Loader%20o%20Activity%20Indicator" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F11%2F04%2Fadobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/activity-indicator/" title="Activity Indicator" rel="tag">Activity Indicator</a>, <a href="http://www.undolog.com/tag/adobe-flash-cs4/" title="Adobe Flash CS4" rel="tag">Adobe Flash CS4</a>, <a href="http://www.undolog.com/tag/ajax-loader/" title="Ajax Loader" rel="tag">Ajax Loader</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs4-sviluppo/" title="Flash CS4" rel="tag">Flash CS4</a>, <a href="http://www.undolog.com/tag/png/" title="PNG" rel="tag">PNG</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a>, <a href="http://www.undolog.com/tag/tutorials/" title="Tutorials" rel="tag">Tutorials</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/03/wordpress-usare-gli-shortcodes/" title="Wordpress: usare gli shortcodes (3 luglio, 2009)">Wordpress: usare gli shortcodes</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/11/01/wordpress-rimuovere-i-menu-dellamministrazione/" title="Wordpress: rimuovere i menu dell&#8217;amministrazione (1 novembre, 2008)">Wordpress: rimuovere i menu dell&#8217;amministrazione</a> (12)</li>
	<li><a href="http://www.undolog.com/2009/02/09/wordpress-personalizzare-la-navigazione-tra-i-post/" title="Wordpress: personalizzare la navigazione tra i post (9 febbraio, 2009)">Wordpress: personalizzare la navigazione tra i post</a> (5)</li>
	<li><a href="http://www.undolog.com/2008/10/03/wordpress-come-scrivere-un-reply-to-comment-usando-jquery/" title="Wordpress: come scrivere un reply to comment usando jQuery (3 ottobre, 2008)">Wordpress: come scrivere un reply to comment usando jQuery</a> (18)</li>
	<li><a href="http://www.undolog.com/2008/10/24/wordpress-come-creare-passo-passo-un-proprio-login/" title="Wordpress: come creare passo passo un proprio login (24 ottobre, 2008)">Wordpress: come creare passo passo un proprio login</a> (21)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/11/04/adobe-flash-cs4-creare-un-ajax-loader-o-activity-indicator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe Flash Professional CS5 per Apple iPhone</title>
		<link>http://www.undolog.com/2009/10/07/adobe-flash-professiona-cs5-per-apple-iphone/</link>
		<comments>http://www.undolog.com/2009/10/07/adobe-flash-professiona-cs5-per-apple-iphone/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 08:16:54 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe Flash Professiona 5]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=2522</guid>
		<description><![CDATA[

Adobe Professional CS5 - preview
Applicazioni iPhone





	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	



	Tags: Adobe, Adobe Flash Professiona 5, Apple, Eventi &#38; Iniziative, Flash, iPhone, Mobile, Sviluppo, Tecnologia

	Post correlati
	
	XCode: organizzare il codice con la direttiva #pragma mark (0)
	XCode: consigli sul Debugging Preferences (0)
	Xcode shortcut (0)
	Web2.0: Adobe ci prova con Apollo? (2)
	Very short trick: fermare NSTimer (0)


]]></description>
			<content:encoded><![CDATA[<p class="center"><img src="http://www.undolog.com/wp-content/uploads/2009/10/Immagine-2.png" alt="Adobe Flash Professiona 5 per Apple iPhone" title="Adobe Flash Professiona 5 per Apple iPhone" width="482" height="130" class="alignnone size-full wp-image-2521" /></p>
<ul>
<li><a href="http://labs.adobe.com/technologies/flashcs5/">Adobe Professional CS5 - preview</a></li>
<li><a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">Applicazioni iPhone</a></li>
</ul>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;bodytext=%0D%0A%0D%0AAdobe%20Professional%20CS5%20-%20preview%0D%0AApplicazioni%20iPhone%0D%0A" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;notes=%0D%0A%0D%0AAdobe%20Professional%20CS5%20-%20preview%0D%0AApplicazioni%20iPhone%0D%0A" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;t=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;annotation=%0D%0A%0D%0AAdobe%20Professional%20CS5%20-%20preview%0D%0AApplicazioni%20iPhone%0D%0A" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;headline=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=%0D%0A%0D%0AAdobe%20Professional%20CS5%20-%20preview%0D%0AApplicazioni%20iPhone%0D%0A" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;t=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F&amp;title=Adobe%20Flash%20Professional%20CS5%20per%20Apple%20iPhone" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F10%2F07%2Fadobe-flash-professiona-cs5-per-apple-iphone%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/adobe/" title="Adobe" rel="tag">Adobe</a>, <a href="http://www.undolog.com/tag/adobe-flash-professiona-5/" title="Adobe Flash Professiona 5" rel="tag">Adobe Flash Professiona 5</a>, <a href="http://www.undolog.com/tag/apple/" title="Apple" rel="tag">Apple</a>, <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/iphone/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tecnologia/" title="Tecnologia" rel="tag">Tecnologia</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/20/xcode-consigli-sul-debugging-preferences/" title="XCode: consigli sul Debugging Preferences (20 luglio, 2009)">XCode: consigli sul Debugging Preferences</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/23/xcode-shortcut/" title="Xcode shortcut (23 luglio, 2009)">Xcode shortcut</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
	<li><a href="http://www.undolog.com/2009/06/16/very-short-trick-fermare-nstimer/" title="Very short trick: fermare NSTimer (16 giugno, 2009)">Very short trick: fermare NSTimer</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/10/07/adobe-flash-professiona-cs5-per-apple-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Da Actionscript ad Objective-C</title>
		<link>http://www.undolog.com/2009/06/12/da-actionscript-ad-objective-c/</link>
		<comments>http://www.undolog.com/2009/06/12/da-actionscript-ad-objective-c/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 08:00:26 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[ANSI-C]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Object-Oriented]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=1725</guid>
		<description><![CDATA[Ho pensato che potrebbe essere utile a chi si è avvicinato da poco allo sviluppo di applicazioni per Apple iPhone, confrontare Adobe Actionscript - il linguaggio utilizzato in Adobe Flash e Adobe Flex, più diffuso tra i neo-programmatori - e Objective-C, il linguaggio utilizzato da Apple per sviluppare le sue applicazioni. Objective-C è a tutti [...]]]></description>
			<content:encoded><![CDATA[<p>Ho pensato che potrebbe essere utile a chi si è avvicinato da poco allo sviluppo di <strong>applicazioni per Apple iPhone</strong>, <strong>confrontare Adobe Actionscript</strong> - il linguaggio utilizzato in <strong>Adobe Flash e Adobe Flex</strong>, più diffuso tra i neo-programmatori - e <strong>Objective-C</strong>, il linguaggio utilizzato da Apple per sviluppare le sue applicazioni. Objective-C è a tutti gli effetti un linguaggio ad oggetti nel senso puro, non che Actionscript non lo sia, ma Objective-C ha sicuramente una marcia in più in quanto è un'estensione dell'ANSI C e la sua sintassi è un mix tra C/C++ e Smalltalk; è un vero OO (Object-oriented language). Moltissime caratteristiche dell'Objective-C non sono presenti in Actionscript che, nell'ultima release 3.0, ha dimostrato di poter crescere nonostante sia ancora lontano dal profilo di un buon linguaggio di sviluppo ad oggetti.</p>
<h4>Classi</h4>
<p>Ad esempio vediamo come vengono diversamente strutturate le definizioni delle classi in Actionscript e Objective-C.</p>
<div class="igBar"><span id="lactionscript3-8"><a href="#" onclick="javascript:showCodeTxt('actionscript3-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-8">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// pakage - per il namespacing di Adobe</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">pakage <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// definizione della classe vera e propria</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> MyClass <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// definizione delle proprietà (pubbliche o private)</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> myPropertyVar<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// costruttore</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> MyClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// todo</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// metodo pubblico</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> myMethod<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// todo</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In Objective-C la prima differenza (ereditata dal C) è la separazione tra le "definizioni" e l'implementazione. In Objective-C avrete sempre a che fare con due tipi di file distinti: .h e .m (in C avremmo .h e .c). I file .h (header file) contengono solo le definizioni, quindi nessuna impostazione o implementazione.</p>
<div class="igBar"><span id="lobjc-9"><a href="#" onclick="javascript:showCodeTxt('objc-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-9">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// myClass.h</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@interface</span> myClass <span style="color: #002200;">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/"><span style="color: #400080;">NSObject</span></a> <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #a61390;">@public</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>myPropertyVar;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>myMethod;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nel file .m abbiamo invece:</p>
<div class="igBar"><span id="lobjc-10"><a href="#" onclick="javascript:showCodeTxt('objc-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-10">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// myClass.m</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@implementation</span> myClass</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> myMethod <span style="color: #002200;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// todo</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #a61390;">@end</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Objective-C gestisce le proprietà e i metodi in modo abbastanza differente da Actionscript. Ad esempio il metodo <code>myMethod</code> visto in precedenza viene chiamato (o invocato) in questo modo:</p>
<div class="igBar"><span id="lobjc-11"><a href="#" onclick="javascript:showCodeTxt('objc-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-11">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>self myMethod<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Si parla, infatti, di Sending Message, più che di chiamata ad un metodo!</p>
<blockquote><p><strong>Nota</strong>: questa caratteristica è reale. Quando si invoca un metodo in Objective-C non si chiama un indirizzo fisico o puntatore a funzione. In Objective-C si spedisce effettivamente all'oggetto un vero e proprio messaggio dove gli si chiede di eseguire un particolare "metodo"</p>
</blockquote>
<p>La sintassi con le parentesi quadre, forse la cosa più difficile da digerire anche per gli sviluppatori ANSI C, risulta più chiara e semplice se consideriamo che:</p>
<div class="igBar"><span id="lobjc-12"><a href="#" onclick="javascript:showCodeTxt('objc-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-12">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myClass.myMethod<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// è uguale a</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>myClass myMethod<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// oppure</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myClass.myPropertyVar <span style="color: #002200;">=</span> <span style="color: #2400d9;color:#800000;">1978</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// uguale a</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #002200;">&#91;</span>myClass setMyPropertyVar<span style="color: #002200;">:</span>1978<span style="color: #002200;">&#93;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Per quanto riguarda la creazione di oggetti, quindi la creazione di una instanza di una classe, abbiamo:</p>
<div class="igBar"><span id="lactionscript3-13"><a href="#" onclick="javascript:showCodeTxt('actionscript3-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-13">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> istanceMyClass<span style="color: #000066; font-weight: bold;">:</span>MyClass = <span style="color: #0033ff; font-weight: bold;">new</span> MyClass<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lobjc-14"><a href="#" onclick="javascript:showCodeTxt('objc-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Objective-C:</span>
<div id="objc-14">
<div class="objc" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">MyClass <span style="color: #002200;">*</span>istanceMyClass <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>MyClass alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// o più semplicemente</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">MyClass <span style="color: #002200;">*</span>istanceMyClass <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>MyClass alloc<span style="color: #002200;">&#93;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// Objective-C non supporta in realtà un unico costruttore, come</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// avviene invece in Actionscript: vedi ad esempio initWithName,</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #11740a; font-style: italic;">// initWithFrame o semplicemente init</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Tutto questo è solo un semplice aiuto, che lascia inesplorate moltissime altre funzionalità dell'Objective-C; ci sono concetti come i puntatori (simili ai riferimenti in Actionscript - ma non uguali), i protocolli, le categorie e molto altro ancora. Se siete proprio sconfortati nell'affrontare Objective-C, come ho già consigliato altre volte, <a target="_blank" href="http://books.google.it/books?id=QR_FfKzNHPMC&#038;pg=PT1&#038;lpg=PT1&#038;dq=compra+kernigan+e+ritch+C&#038;source=bl&#038;ots=-p2gIo3xDI&#038;sig=1NZFB2QAKEpC8T8HFFpuYwh3lHc&#038;hl=it&#038;ei=isojSoamIIaU_Qa-7pzDBg&#038;sa=X&#038;oi=book_result&#038;ct=result&#038;resnum=5#PPP1,M1">partite dall'ANSI C</a>, lasciate stare - per adesso - Actionscript, Javascript o PHP! Quest'ultimi, conoscendo bene l'ANSI C, li riscoprirete sotto una luce davvero differente.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C&amp;bodytext=Ho%20pensato%20che%20potrebbe%20essere%20utile%20a%20chi%20si%20%C3%A8%20avvicinato%20da%20poco%20allo%20sviluppo%20di%20applicazioni%20per%20Apple%20iPhone%2C%20confrontare%20Adobe%20Actionscript%20-%20il%20linguaggio%20utilizzato%20in%20Adobe%20Flash%20e%20Adobe%20Flex%2C%20pi%C3%B9%20diffuso%20tra%20i%20neo-programmatori%20-%20e%20Object" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C&amp;notes=Ho%20pensato%20che%20potrebbe%20essere%20utile%20a%20chi%20si%20%C3%A8%20avvicinato%20da%20poco%20allo%20sviluppo%20di%20applicazioni%20per%20Apple%20iPhone%2C%20confrontare%20Adobe%20Actionscript%20-%20il%20linguaggio%20utilizzato%20in%20Adobe%20Flash%20e%20Adobe%20Flex%2C%20pi%C3%B9%20diffuso%20tra%20i%20neo-programmatori%20-%20e%20Object" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;t=Da%20Actionscript%20ad%20Objective-C" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C&amp;annotation=Ho%20pensato%20che%20potrebbe%20essere%20utile%20a%20chi%20si%20%C3%A8%20avvicinato%20da%20poco%20allo%20sviluppo%20di%20applicazioni%20per%20Apple%20iPhone%2C%20confrontare%20Adobe%20Actionscript%20-%20il%20linguaggio%20utilizzato%20in%20Adobe%20Flash%20e%20Adobe%20Flex%2C%20pi%C3%B9%20diffuso%20tra%20i%20neo-programmatori%20-%20e%20Object" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Da%20Actionscript%20ad%20Objective-C%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Da%20Actionscript%20ad%20Objective-C&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Da%20Actionscript%20ad%20Objective-C&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Da%20Actionscript%20ad%20Objective-C&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;headline=Da%20Actionscript%20ad%20Objective-C&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Ho%20pensato%20che%20potrebbe%20essere%20utile%20a%20chi%20si%20%C3%A8%20avvicinato%20da%20poco%20allo%20sviluppo%20di%20applicazioni%20per%20Apple%20iPhone%2C%20confrontare%20Adobe%20Actionscript%20-%20il%20linguaggio%20utilizzato%20in%20Adobe%20Flash%20e%20Adobe%20Flex%2C%20pi%C3%B9%20diffuso%20tra%20i%20neo-programmatori%20-%20e%20Object" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;t=Da%20Actionscript%20ad%20Objective-C" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Da%20Actionscript%20ad%20Objective-C&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F&amp;title=Da%20Actionscript%20ad%20Objective-C" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F06%2F12%2Fda-actionscript-ad-objective-c%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/ansi-c/" title="ANSI-C" rel="tag">ANSI-C</a>, <a href="http://www.undolog.com/tag/apple/" title="Apple" rel="tag">Apple</a>, <a href="http://www.undolog.com/tag/c/" title="c" rel="tag">c</a>, <a href="http://www.undolog.com/tag/cc/" title="C/C++" rel="tag">C/C++</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/iphone/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/" title="iPhone" rel="tag">iPhone</a>, <a href="http://www.undolog.com/category/mobile/" title="Mobile" rel="tag">Mobile</a>, <a href="http://www.undolog.com/tag/object-oriented/" title="Object-Oriented" rel="tag">Object-Oriented</a>, <a href="http://www.undolog.com/tag/objective-c/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/iphone-sviluppo/objective-c-sviluppo/" title="Objective-C" rel="tag">Objective-C</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tecnologia/" title="Tecnologia" rel="tag">Tecnologia</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/06/01/hi-phone/" title="Hi phone (1 giugno, 2009)">Hi phone</a> (7)</li>
	<li><a href="http://www.undolog.com/2008/03/05/linguaggi-di-sviluppo/" title="Linguaggi di sviluppo (5 marzo, 2008)">Linguaggi di sviluppo</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/10/xcode-organizzare-il-codice-con-la-direttiva-pragma-mark/" title="XCode: organizzare il codice con la direttiva #pragma mark (10 luglio, 2009)">XCode: organizzare il codice con la direttiva #pragma mark</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/07/23/xcode-shortcut/" title="Xcode shortcut (23 luglio, 2009)">Xcode shortcut</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/06/16/very-short-trick-fermare-nstimer/" title="Very short trick: fermare NSTimer (16 giugno, 2009)">Very short trick: fermare NSTimer</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/06/12/da-actionscript-ad-objective-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Very short snippet: estendere un array Actionscript con il metodo shuffle()</title>
		<link>http://www.undolog.com/2009/04/02/very-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle/</link>
		<comments>http://www.undolog.com/2009/04/02/very-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 13:40:06 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Codice]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Math.floor()]]></category>
		<category><![CDATA[Math.random()]]></category>
		<category><![CDATA[Matrix]]></category>
		<category><![CDATA[MatrixArray]]></category>
		<category><![CDATA[mescolare]]></category>
		<category><![CDATA[parseInt()]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[shuffle()]]></category>
		<category><![CDATA[Snipp]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=1512</guid>
		<description><![CDATA[Avevo parlato già di come realizzare il metodo shuffle() in Javascript e Actionscript. Mi sono accorto, tuttaavia, di non aver sottolineato che anche Actionscript è in grado di estendere, nel medesimo modo di Javascript, il proprio oggetto Array:
PLAIN TEXT
Actionscript:




Array.prototype.shuffle = function&#40;&#41; &#123;


&#160; &#160; for&#40;var j:uint, x:*, i:uint = this.length; i; j = Math.floor&#40;Math.random&#40;&#41; * i&#41;, [...]]]></description>
			<content:encoded><![CDATA[<p>Avevo parlato già di <a href="http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/">come realizzare il metodo shuffle() in Javascript e Actionscript</a>. Mi sono accorto, tuttaavia, di non aver sottolineato che anche Actionscript è in grado di estendere, nel medesimo modo di Javascript, il proprio oggetto <code>Array</code>:</p>
<div class="igBar"><span id="lactionscript3-18"><a href="#" onclick="javascript:showCodeTxt('actionscript3-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-18">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">prototype</span><span style="color: #000066; font-weight: bold;">.</span>shuffle = <span style="color: #339966; font-weight: bold;">function</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:*,</span> i<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">;</span> j = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span><span style="color: #000066; font-weight: bold;">--</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = <span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Questo codice può essere inserito anche all'interno di una classe, ad esempio nel costruttore:</p>
<div class="igBar"><span id="lactionscript3-19"><a href="#" onclick="javascript:showCodeTxt('actionscript3-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-19">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Hello <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span style="color: #004993;">MovieClip</span></a> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Hello<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">prototype</span><span style="color: #000066; font-weight: bold;">.</span>shuffle = <span style="color: #339966; font-weight: bold;">function</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:*,</span> i<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">;</span> j = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span><span style="color: #000066; font-weight: bold;">--</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = <span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Per usare poi tale "estensione" è sufficiente chiamare il meotodo <code>shuffle()</code> da qualsiasi istanza di un <code>array</code>:</p>
<div class="igBar"><span id="lactionscript3-20"><a href="#" onclick="javascript:showCodeTxt('actionscript3-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-20">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> a<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html"><span style="color: #004993;">Array</span></a> = <span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;ciao&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;come&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;va&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">a<span style="color: #000066; font-weight: bold;">.</span>shuffle<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;bodytext=Avevo%20parlato%20gi%C3%A0%20di%20come%20realizzare%20il%20metodo%20shuffle%28%29%20in%20Javascript%20e%20Actionscript.%20Mi%20sono%20accorto%2C%20tuttaavia%2C%20di%20non%20aver%20sottolineato%20che%20anche%20Actionscript%20%C3%A8%20in%20grado%20di%20estendere%2C%20nel%20medesimo%20modo%20di%20Javascript%2C%20il%20proprio%20oggetto%20Array%3A%0D%0A" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;notes=Avevo%20parlato%20gi%C3%A0%20di%20come%20realizzare%20il%20metodo%20shuffle%28%29%20in%20Javascript%20e%20Actionscript.%20Mi%20sono%20accorto%2C%20tuttaavia%2C%20di%20non%20aver%20sottolineato%20che%20anche%20Actionscript%20%C3%A8%20in%20grado%20di%20estendere%2C%20nel%20medesimo%20modo%20di%20Javascript%2C%20il%20proprio%20oggetto%20Array%3A%0D%0A" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;t=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;annotation=Avevo%20parlato%20gi%C3%A0%20di%20come%20realizzare%20il%20metodo%20shuffle%28%29%20in%20Javascript%20e%20Actionscript.%20Mi%20sono%20accorto%2C%20tuttaavia%2C%20di%20non%20aver%20sottolineato%20che%20anche%20Actionscript%20%C3%A8%20in%20grado%20di%20estendere%2C%20nel%20medesimo%20modo%20di%20Javascript%2C%20il%20proprio%20oggetto%20Array%3A%0D%0A" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;headline=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Avevo%20parlato%20gi%C3%A0%20di%20come%20realizzare%20il%20metodo%20shuffle%28%29%20in%20Javascript%20e%20Actionscript.%20Mi%20sono%20accorto%2C%20tuttaavia%2C%20di%20non%20aver%20sottolineato%20che%20anche%20Actionscript%20%C3%A8%20in%20grado%20di%20estendere%2C%20nel%20medesimo%20modo%20di%20Javascript%2C%20il%20proprio%20oggetto%20Array%3A%0D%0A" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;t=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F&amp;title=Very%20short%20snippet%3A%20estendere%20un%20array%20Actionscript%20con%20il%20metodo%20shuffle%28%29" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F04%2F02%2Fvery-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/array/" title="Array" rel="tag">Array</a>, <a href="http://www.undolog.com/tag/as3/" title="AS3" rel="tag">AS3</a>, <a href="http://www.undolog.com/tag/codice/" title="Codice" rel="tag">Codice</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/mathfloor/" title="Math.floor()" rel="tag">Math.floor()</a>, <a href="http://www.undolog.com/tag/mathrandom/" title="Math.random()" rel="tag">Math.random()</a>, <a href="http://www.undolog.com/tag/matrix/" title="Matrix" rel="tag">Matrix</a>, <a href="http://www.undolog.com/tag/matrixarray/" title="MatrixArray" rel="tag">MatrixArray</a>, <a href="http://www.undolog.com/tag/mescolare/" title="mescolare" rel="tag">mescolare</a>, <a href="http://www.undolog.com/tag/parseint/" title="parseInt()" rel="tag">parseInt()</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/prototype/" title="Prototype" rel="tag">Prototype</a>, <a href="http://www.undolog.com/tag/random/" title="Random" rel="tag">Random</a>, <a href="http://www.undolog.com/tag/shuffle/" title="shuffle()" rel="tag">shuffle()</a>, <a href="http://www.undolog.com/tag/snipp/" title="Snipp" rel="tag">Snipp</a>, <a href="http://www.undolog.com/tag/source/" title="Source" rel="tag">Source</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/" title="Very short snippet: shuffle() in Javascript e Actionscript (16 febbraio, 2009)">Very short snippet: shuffle() in Javascript e Actionscript</a> (3)</li>
	<li><a href="http://www.undolog.com/2008/04/26/snipplr-code-20-frammenti-snipp-di-codice-utile/" title="Snipplr code 2.0: frammenti (snipp) di codice utile (26 aprile, 2008)">Snipplr code 2.0: frammenti (snipp) di codice utile</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/08/05/considerazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3/" title="Considerazioni sull&#8217;evoluzione dei linguaggi di svilluppo: AS2 vs AS3 (5 agosto, 2008)">Considerazioni sull&#8217;evoluzione dei linguaggi di svilluppo: AS2 vs AS3</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/09/15/undolibrary-matrixarray-unestensione-della-classe-array/" title="Undolibrary MatrixArray: un&#8217;estensione della classe Array (15 settembre, 2008)">Undolibrary MatrixArray: un&#8217;estensione della classe Array</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/10/03/wordpress-come-scrivere-un-reply-to-comment-usando-jquery/" title="Wordpress: come scrivere un reply to comment usando jQuery (3 ottobre, 2008)">Wordpress: come scrivere un reply to comment usando jQuery</a> (18)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/04/02/very-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Very short snippet: shuffle() in Javascript e Actionscript</title>
		<link>http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/</link>
		<comments>http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 22:23:08 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Codice]]></category>
		<category><![CDATA[Math.floor()]]></category>
		<category><![CDATA[Math.random()]]></category>
		<category><![CDATA[Matrix]]></category>
		<category><![CDATA[MatrixArray]]></category>
		<category><![CDATA[mescolare]]></category>
		<category><![CDATA[parseInt()]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[shuffle()]]></category>
		<category><![CDATA[Snipp]]></category>
		<category><![CDATA[Source]]></category>
		<category><![CDATA[Undolibrary]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=1371</guid>
		<description><![CDATA[In PHP esiste una comoda funzione chiamata shuffle() che permette di mescolare un array (vedi Very short trick: prendere elementi casuali da un array in PHP). Un'ottima versione per Javascript l'ho trovata qui. Qui sotto il codice leggermente rivisto:
PLAIN TEXT
JavaScript:




Array.prototype.shuffle = function&#40;&#41; &#123;


for&#40;var j, x, i = this.length; i; j = Math.floor&#40;Math.random&#40;&#41; * i&#41;, x [...]]]></description>
			<content:encoded><![CDATA[<p>In PHP esiste una comoda funzione chiamata <code>shuffle()</code> che permette di mescolare un array (vedi <em><a href="http://www.undolog.com/2009/01/27/very-short-trick-prendere-elementi-casuali-da-un-array-in-php/">Very short trick: prendere elementi casuali da un array in PHP</a></em>). Un'ottima versione per Javascript l'ho trovata <a target="_blank" href="http://jsfromhell.com/array/shuffle">qui</a>. Qui sotto il codice leggermente rivisto:</p>
<div class="igBar"><span id="ljavascript-23"><a href="#" onclick="javascript:showCodeTxt('javascript-23'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-23">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Array.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">shuffle</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j<span style="color: #339933;">,</span> x<span style="color: #339933;">,</span> i <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">;</span> j <span style="color: #339933;">=</span> Math.<span style="color: #660066;">floor</span><span style="color: #009900;">&#40;</span>Math.<span style="color: #660066;">random</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> i<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> x <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span><span style="color: #339933;">--</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Rispetto <a target="_blank" href="http://jsfromhell.com/array/shuffle">all'originale</a> ho esteso l'oggetto <code>Array</code> e inserito <code>Math.floor()</code> al posto di <code>parseInt()</code>, in quanto da test effettuati è risultato estremamente più veloce, almeno sulla mia macchina e con FireFox 3.</p>
<p>In ActionScript 3.0 l'ho usata all'interno della classe <a target="_blank" href="http://code.google.com/p/undolibrary/source/browse/trunk/as3/undolibrary/utils/MatrixArray.as">MatrixArray</a>:</p>
<div class="igBar"><span id="lactionscript3-24"><a href="#" onclick="javascript:showCodeTxt('actionscript3-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-24">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Mescola in modo casuale la matrice</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> shuffle<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// thanks to http://jsfromhell.com/array/shuffle</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> i = __len<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">;</span> j = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">*</span> __len<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">x</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span><span style="color: #000066; font-weight: bold;">--</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span> = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = <span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;bodytext=In%20PHP%20esiste%20una%20comoda%20funzione%20chiamata%20shuffle%28%29%20che%20permette%20di%20mescolare%20un%20array%20%28vedi%20Very%20short%20trick%3A%20prendere%20elementi%20casuali%20da%20un%20array%20in%20PHP%29.%20Un%27ottima%20versione%20per%20Javascript%20l%27ho%20trovata%20qui.%20Qui%20sotto%20il%20codice%20leggermente%20rivisto" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;notes=In%20PHP%20esiste%20una%20comoda%20funzione%20chiamata%20shuffle%28%29%20che%20permette%20di%20mescolare%20un%20array%20%28vedi%20Very%20short%20trick%3A%20prendere%20elementi%20casuali%20da%20un%20array%20in%20PHP%29.%20Un%27ottima%20versione%20per%20Javascript%20l%27ho%20trovata%20qui.%20Qui%20sotto%20il%20codice%20leggermente%20rivisto" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;t=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;annotation=In%20PHP%20esiste%20una%20comoda%20funzione%20chiamata%20shuffle%28%29%20che%20permette%20di%20mescolare%20un%20array%20%28vedi%20Very%20short%20trick%3A%20prendere%20elementi%20casuali%20da%20un%20array%20in%20PHP%29.%20Un%27ottima%20versione%20per%20Javascript%20l%27ho%20trovata%20qui.%20Qui%20sotto%20il%20codice%20leggermente%20rivisto" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;headline=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=In%20PHP%20esiste%20una%20comoda%20funzione%20chiamata%20shuffle%28%29%20che%20permette%20di%20mescolare%20un%20array%20%28vedi%20Very%20short%20trick%3A%20prendere%20elementi%20casuali%20da%20un%20array%20in%20PHP%29.%20Un%27ottima%20versione%20per%20Javascript%20l%27ho%20trovata%20qui.%20Qui%20sotto%20il%20codice%20leggermente%20rivisto" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;t=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F&amp;title=Very%20short%20snippet%3A%20shuffle%28%29%20in%20Javascript%20e%20Actionscript" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F02%2F16%2Fvery-short-snippet-shuffle-in-javascript-e-actionscript%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/array/" title="Array" rel="tag">Array</a>, <a href="http://www.undolog.com/tag/as3/" title="AS3" rel="tag">AS3</a>, <a href="http://www.undolog.com/tag/codice/" title="Codice" rel="tag">Codice</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/mathfloor/" title="Math.floor()" rel="tag">Math.floor()</a>, <a href="http://www.undolog.com/tag/mathrandom/" title="Math.random()" rel="tag">Math.random()</a>, <a href="http://www.undolog.com/tag/matrix/" title="Matrix" rel="tag">Matrix</a>, <a href="http://www.undolog.com/tag/matrixarray/" title="MatrixArray" rel="tag">MatrixArray</a>, <a href="http://www.undolog.com/tag/mescolare/" title="mescolare" rel="tag">mescolare</a>, <a href="http://www.undolog.com/tag/parseint/" title="parseInt()" rel="tag">parseInt()</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/prototype/" title="Prototype" rel="tag">Prototype</a>, <a href="http://www.undolog.com/tag/random/" title="Random" rel="tag">Random</a>, <a href="http://www.undolog.com/tag/shuffle/" title="shuffle()" rel="tag">shuffle()</a>, <a href="http://www.undolog.com/tag/snipp/" title="Snipp" rel="tag">Snipp</a>, <a href="http://www.undolog.com/tag/source/" title="Source" rel="tag">Source</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/undolibrary/" title="Undolibrary" rel="tag">Undolibrary</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/04/02/very-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle/" title="Very short snippet: estendere un array Actionscript con il metodo shuffle() (2 aprile, 2009)">Very short snippet: estendere un array Actionscript con il metodo shuffle()</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/09/15/undolibrary-matrixarray-unestensione-della-classe-array/" title="Undolibrary MatrixArray: un&#8217;estensione della classe Array (15 settembre, 2008)">Undolibrary MatrixArray: un&#8217;estensione della classe Array</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/04/26/snipplr-code-20-frammenti-snipp-di-codice-utile/" title="Snipplr code 2.0: frammenti (snipp) di codice utile (26 aprile, 2008)">Snipplr code 2.0: frammenti (snipp) di codice utile</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/08/05/considerazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3/" title="Considerazioni sull&#8217;evoluzione dei linguaggi di svilluppo: AS2 vs AS3 (5 agosto, 2008)">Considerazioni sull&#8217;evoluzione dei linguaggi di svilluppo: AS2 vs AS3</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/10/03/wordpress-come-scrivere-un-reply-to-comment-usando-jquery/" title="Wordpress: come scrivere un reply to comment usando jQuery (3 ottobre, 2008)">Wordpress: come scrivere un reply to comment usando jQuery</a> (18)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How I did it: il logo di Saidmade</title>
		<link>http://www.undolog.com/2009/01/14/how-i-did-it-il-logo-di-saidmade/</link>
		<comments>http://www.undolog.com/2009/01/14/how-i-did-it-il-logo-di-saidmade/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 09:55:15 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Grafica & Design]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[logotipo]]></category>
		<category><![CDATA[Saidmade]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=1171</guid>
		<description><![CDATA[Quando mi è stato chiesto di disegnare ed ideare il logo per Saidmade, come spesso accade per le proprie creature, ero abbastanza agitato. Tuttavia non era possibile affidarsi all'inventiva di altri, bisognava esprimere ciò che stava per nascere in modo autonomo e personale. Alla fine sono molto soddisfatto del risultato finale. Il simbolo che ne [...]]]></description>
			<content:encoded><![CDATA[<p>Quando mi è stato chiesto di disegnare ed ideare il logo per <a href="http://www.saidmade.com" target="_blank">Saidmade</a>, come spesso accade per le proprie creature, ero abbastanza agitato. Tuttavia non era possibile affidarsi all'inventiva di altri, bisognava esprimere ciò che stava per nascere in modo autonomo e personale. Alla fine sono molto soddisfatto del risultato finale. Il simbolo che ne è uscito è esattamente ciò che cercavamo!</p>
<p class="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="640" height="640" id="saidmadeab" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="http://labs.saidmade.com/images/saidmadeab.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://labs.saidmade.com/images/saidmadeab.swf" menu="false" quality="high" bgcolor="#000000" width="640" height="640" name="saidmadeab" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object></p>
<p>La caratteristica migliore del logo-grafico di <a href="http://www.saidmade.com" target="_blank">Saidmade</a> è la sua costruzione, basata esclusivamente su un elemento triangolare che oltre ad esprimere semplicità rappresenta tre vertici riconducibili ai i tre soci fondatori.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;bodytext=Quando%20mi%20%C3%A8%20stato%20chiesto%20di%20disegnare%20ed%20ideare%20il%20logo%20per%20Saidmade%2C%20come%20spesso%20accade%20per%20le%20proprie%20creature%2C%20ero%20abbastanza%20agitato.%20Tuttavia%20non%20era%20possibile%20affidarsi%20all%27inventiva%20di%20altri%2C%20bisognava%20esprimere%20ci%C3%B2%20che%20stava%20per%20nascere%20in" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;notes=Quando%20mi%20%C3%A8%20stato%20chiesto%20di%20disegnare%20ed%20ideare%20il%20logo%20per%20Saidmade%2C%20come%20spesso%20accade%20per%20le%20proprie%20creature%2C%20ero%20abbastanza%20agitato.%20Tuttavia%20non%20era%20possibile%20affidarsi%20all%27inventiva%20di%20altri%2C%20bisognava%20esprimere%20ci%C3%B2%20che%20stava%20per%20nascere%20in" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;t=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;annotation=Quando%20mi%20%C3%A8%20stato%20chiesto%20di%20disegnare%20ed%20ideare%20il%20logo%20per%20Saidmade%2C%20come%20spesso%20accade%20per%20le%20proprie%20creature%2C%20ero%20abbastanza%20agitato.%20Tuttavia%20non%20era%20possibile%20affidarsi%20all%27inventiva%20di%20altri%2C%20bisognava%20esprimere%20ci%C3%B2%20che%20stava%20per%20nascere%20in" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade%20-%20http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;story=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;body=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;link=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;headline=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Quando%20mi%20%C3%A8%20stato%20chiesto%20di%20disegnare%20ed%20ideare%20il%20logo%20per%20Saidmade%2C%20come%20spesso%20accade%20per%20le%20proprie%20creature%2C%20ero%20abbastanza%20agitato.%20Tuttavia%20non%20era%20possibile%20affidarsi%20all%27inventiva%20di%20altri%2C%20bisognava%20esprimere%20ci%C3%B2%20che%20stava%20per%20nascere%20in" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;t=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade&amp;url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F&amp;title=How%20I%20did%20it%3A%20il%20logo%20di%20Saidmade" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2009%2F01%2F14%2Fhow-i-did-it-il-logo-di-saidmade%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/grafica-design/" title="Grafica &amp; Design" rel="tag">Grafica &amp; Design</a>, <a href="http://www.undolog.com/tag/grafica-design/" title="Grafica &amp; Design" rel="tag">Grafica &amp; Design</a>, <a href="http://www.undolog.com/tag/logo/" title="logo" rel="tag">logo</a>, <a href="http://www.undolog.com/tag/logotipo/" title="logotipo" rel="tag">logotipo</a>, <a href="http://www.undolog.com/tag/saidmade/" title="Saidmade" rel="tag">Saidmade</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/02/26/web20-styles/" title="Web2.0 Styles (26 febbraio, 2007)">Web2.0 Styles</a> (1)</li>
	<li><a href="http://www.undolog.com/2007/07/12/unobtrusive-lightwindow-20/" title="Unobtrusive LightWindow 2.0 (12 luglio, 2007)">Unobtrusive LightWindow 2.0</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/04/10/shadowbox-30-beta/" title="Shadowbox 3.0 beta (10 aprile, 2009)">Shadowbox 3.0 beta</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/03/18/rinascono-gli-elementi-di-undologcom/" title="Rinascono gli elementi di undolog.com (18 marzo, 2008)">Rinascono gli elementi di undolog.com</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/03/26/photoshop-study-cayman-racing-team/" title="Photoshop study: Cayman Racing Team (26 marzo, 2008)">Photoshop study: Cayman Racing Team</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2009/01/14/how-i-did-it-il-logo-di-saidmade/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Very short trick: proxy RSS con SimplePie</title>
		<link>http://www.undolog.com/2008/12/22/very-short-trick-proxy-rss-con-simplepie/</link>
		<comments>http://www.undolog.com/2008/12/22/very-short-trick-proxy-rss-con-simplepie/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 11:50:23 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[GET]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[proxy-server]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[SimplePie]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tunneling]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=1085</guid>
		<description><![CDATA[Se usate Flash o Ajax per leggere Feed RSS da altri domini, dovete necessariamente dotarvi di un proxy (tunneling) a causa delle protezioni imposte da entrambe le tecnologie (vedi Tunneling e proxy server per Ajax e non solo ). Se sul vostro sito o blog è già presente SimplePie, potete scrivere una semplice proxy in [...]]]></description>
			<content:encoded><![CDATA[<p>Se usate Flash o Ajax per leggere Feed RSS da altri domini, dovete necessariamente dotarvi di un proxy (tunneling) a causa delle protezioni imposte da entrambe le tecnologie (vedi <em><a href="http://www.undolog.com/2007/12/10/tunneling-e-proxy-server-per-ajax-e-non-solo/0/">Tunneling e proxy server per Ajax e non solo</a></em> ). Se sul vostro sito o blog è già presente <a target="_blank" href="http://simplepie.org/downloads/">SimplePie</a>, potete scrivere una semplice proxy in questo modo:</p>
<div class="igBar"><span id="lphp-27"><a href="#" onclick="javascript:showCodeTxt('php-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-27">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;simplepie.inc&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_feed_url</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'http://www.undolog.com/feed'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enable_xml_dump</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>A questo file (ad esempio proxy.php) è possibile inviare in <code>GET</code> l'url del feed che volete leggere:</p>
<div class="igBar"><span id="lphp-28"><a href="#" onclick="javascript:showCodeTxt('php-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-28">
<div class="php" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;simplepie.inc&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_feed_url</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'feedurl'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enable_xml_dump</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Usando nella chiamata <code>proxy.php?feedurl=http://www.cnn.com/feed</code></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;bodytext=Se%20usate%20Flash%20o%20Ajax%20per%20leggere%20Feed%20RSS%20da%20altri%20domini%2C%20dovete%20necessariamente%20dotarvi%20di%20un%20proxy%20%28tunneling%29%20a%20causa%20delle%20protezioni%20imposte%20da%20entrambe%20le%20tecnologie%20%28vedi%20Tunneling%20e%20proxy%20server%20per%20Ajax%20e%20non%20solo%20%29.%20Se%20sul%20vostro%20sito%20o%20b" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;notes=Se%20usate%20Flash%20o%20Ajax%20per%20leggere%20Feed%20RSS%20da%20altri%20domini%2C%20dovete%20necessariamente%20dotarvi%20di%20un%20proxy%20%28tunneling%29%20a%20causa%20delle%20protezioni%20imposte%20da%20entrambe%20le%20tecnologie%20%28vedi%20Tunneling%20e%20proxy%20server%20per%20Ajax%20e%20non%20solo%20%29.%20Se%20sul%20vostro%20sito%20o%20b" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;t=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;annotation=Se%20usate%20Flash%20o%20Ajax%20per%20leggere%20Feed%20RSS%20da%20altri%20domini%2C%20dovete%20necessariamente%20dotarvi%20di%20un%20proxy%20%28tunneling%29%20a%20causa%20delle%20protezioni%20imposte%20da%20entrambe%20le%20tecnologie%20%28vedi%20Tunneling%20e%20proxy%20server%20per%20Ajax%20e%20non%20solo%20%29.%20Se%20sul%20vostro%20sito%20o%20b" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;headline=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Se%20usate%20Flash%20o%20Ajax%20per%20leggere%20Feed%20RSS%20da%20altri%20domini%2C%20dovete%20necessariamente%20dotarvi%20di%20un%20proxy%20%28tunneling%29%20a%20causa%20delle%20protezioni%20imposte%20da%20entrambe%20le%20tecnologie%20%28vedi%20Tunneling%20e%20proxy%20server%20per%20Ajax%20e%20non%20solo%20%29.%20Se%20sul%20vostro%20sito%20o%20b" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;t=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F&amp;title=Very%20short%20trick%3A%20proxy%20Undolog.com%20con%20SimplePie" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F12%2F22%2Fvery-short-trick-proxy-rss-con-simplepie%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/internet/ajax/" title="Ajax" rel="tag">Ajax</a>, <a href="http://www.undolog.com/tag/ajax/" title="Ajax" rel="tag">Ajax</a>, <a href="http://www.undolog.com/tag/feed/" title="feed" rel="tag">feed</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/get/" title="GET" rel="tag">GET</a>, <a href="http://www.undolog.com/tag/http/" title="http" rel="tag">http</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/proxy/" title="proxy" rel="tag">proxy</a>, <a href="http://www.undolog.com/tag/proxy-server/" title="proxy-server" rel="tag">proxy-server</a>, <a href="http://www.undolog.com/tag/rss/" title="rss" rel="tag">rss</a>, <a href="http://www.undolog.com/tag/simplepie/" title="SimplePie" rel="tag">SimplePie</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/trick/" title="trick" rel="tag">trick</a>, <a href="http://www.undolog.com/tag/tunneling/" title="tunneling" rel="tag">tunneling</a>, <a href="http://www.undolog.com/tag/xml/" title="xml" rel="tag">xml</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/12/22/wordpress-plugin-flash-feed-scroll-reader/" title="Wordpress Plugin: Flash Feed Scroll Reader (22 dicembre, 2008)">Wordpress Plugin: Flash Feed Scroll Reader</a> (7)</li>
	<li><a href="http://www.undolog.com/2007/12/10/tunneling-e-proxy-server-per-ajax-e-non-solo/" title="Tunneling e proxy server per Ajax e non solo (10 dicembre, 2007)">Tunneling e proxy server per Ajax e non solo</a> (4)</li>
	<li><a href="http://www.undolog.com/2010/03/17/very-short-snippet-come-identificare-le-chiamate-ajax-in-php/" title="Very short snippet: come identificare le chiamate Ajax in PHP (17 marzo, 2010)">Very short snippet: come identificare le chiamate Ajax in PHP</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/10/11/note-sul-testing-e-debug-in-adobe-flash/" title="Note sul testing e debug in Adobe Flash (11 ottobre, 2007)">Note sul testing e debug in Adobe Flash</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/05/13/google-ajax-language-api-tutorial-sul-funzionamento/" title="Google AJAX Language API: tutorial sul funzionamento (13 maggio, 2008)">Google AJAX Language API: tutorial sul funzionamento</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/12/22/very-short-trick-proxy-rss-con-simplepie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SWFObject su Google AJAX Libraries API</title>
		<link>http://www.undolog.com/2008/11/14/swfobject-su-google-ajax-libraries-api/</link>
		<comments>http://www.undolog.com/2008/11/14/swfobject-su-google-ajax-libraries-api/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 10:24:02 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google AJAX Libraries API]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[librerie]]></category>
		<category><![CDATA[SWFObject]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=955</guid>
		<description><![CDATA[Google AJAX Libraries API allarga il suo parco di librerie e framework anche a SWFObject, utilissima per inserire e manipolare filmati Flash sulle nostre pagine Web. SWFObject è anche disponibile come Plugin per Wordpress; nel momento in cui scrivo, tuttavia, il Plugin non è stato ancora aggiornato per caricare il codice dal "repository" Google. A [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://code.google.com/p/swfobject/" title="swfobject 2.0"><img border="0" align="left" alt="swfobject" src="http://www.undolog.com/wp-content/uploads/2008/03/image33.png" style="border-width: 0px; margin: 0px 10px 0px 0px;"/></a><a target="_blank" href="http://code.google.com/apis/ajaxlibs/">Google AJAX Libraries API</a> allarga il suo parco di librerie e framework anche a <a href="http://www.undolog.com/2008/03/25/unobtrusive-swfobject-20/">SWFObject</a>, utilissima per inserire e manipolare filmati Flash sulle nostre pagine Web. <a href="http://www.undolog.com/2008/03/25/unobtrusive-swfobject-20/">SWFObject</a> è anche disponibile come <a href="http://blog.unijimpe.net/wp-swfobject-20/" target="_blank">Plugin per Wordpress</a>; nel momento in cui scrivo, tuttavia, il Plugin non è stato ancora aggiornato per caricare il codice dal "repository" Google. A breve, quindi, immagino verrà rilasciata anche una nuova versione del Plugin... a meno che non vogliate intanto modificarlo da soli...</p>
<h4>Includere SWFObject da Google AJAX Libraries API</h4>
<p>Come per le altre librerie presenti in <a target="_blank" href="http://code.google.com/apis/ajaxlibs/">Google AJAX Libraries API</a> è possibile usare l'URL assoluto o il meotdo <code>google.load()</code>:</p>
<div class="igBar"><span id="lhtml-31"><a href="#" onclick="javascript:showCodeTxt('html-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-31">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- URL ASSOLUTO --&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Escript.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>script&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Escript.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; swfobject.embedSWF(&quot;main.swf&quot;, &quot;main&quot;, &quot;231&quot;, &quot;132&quot;, &quot;8.0.0&quot;);</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fscript%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="lhtml-32"><a href="#" onclick="javascript:showCodeTxt('html-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-32">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- google.load() --&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Escript.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.google.com/jsapi&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>script&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Escript%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;script&gt;</span></a></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; google.load(&quot;swfobject&quot;, &quot;2.1&quot;);</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; google.setOnLoadCallback(function() {</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; swfobject.embedSWF(&quot;main.swf&quot;, &quot;main&quot;, &quot;231&quot;, &quot;132&quot;, &quot;8.0.0&quot;);</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; });</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fscript%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;bodytext=Google%20AJAX%20Libraries%20API%20allarga%20il%20suo%20parco%20di%20librerie%20e%20framework%20anche%20a%20SWFObject%2C%20utilissima%20per%20inserire%20e%20manipolare%20filmati%20Flash%20sulle%20nostre%20pagine%20Web.%20SWFObject%20%C3%A8%20anche%20disponibile%20come%20Plugin%20per%20Wordpress%3B%20nel%20momento%20in%20cui%20scrivo%2C" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;notes=Google%20AJAX%20Libraries%20API%20allarga%20il%20suo%20parco%20di%20librerie%20e%20framework%20anche%20a%20SWFObject%2C%20utilissima%20per%20inserire%20e%20manipolare%20filmati%20Flash%20sulle%20nostre%20pagine%20Web.%20SWFObject%20%C3%A8%20anche%20disponibile%20come%20Plugin%20per%20Wordpress%3B%20nel%20momento%20in%20cui%20scrivo%2C" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;t=SWFObject%20su%20Google%20AJAX%20Libraries%20API" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;annotation=Google%20AJAX%20Libraries%20API%20allarga%20il%20suo%20parco%20di%20librerie%20e%20framework%20anche%20a%20SWFObject%2C%20utilissima%20per%20inserire%20e%20manipolare%20filmati%20Flash%20sulle%20nostre%20pagine%20Web.%20SWFObject%20%C3%A8%20anche%20disponibile%20come%20Plugin%20per%20Wordpress%3B%20nel%20momento%20in%20cui%20scrivo%2C" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=SWFObject%20su%20Google%20AJAX%20Libraries%20API%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;headline=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Google%20AJAX%20Libraries%20API%20allarga%20il%20suo%20parco%20di%20librerie%20e%20framework%20anche%20a%20SWFObject%2C%20utilissima%20per%20inserire%20e%20manipolare%20filmati%20Flash%20sulle%20nostre%20pagine%20Web.%20SWFObject%20%C3%A8%20anche%20disponibile%20come%20Plugin%20per%20Wordpress%3B%20nel%20momento%20in%20cui%20scrivo%2C" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;t=SWFObject%20su%20Google%20AJAX%20Libraries%20API" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=SWFObject%20su%20Google%20AJAX%20Libraries%20API&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F&amp;title=SWFObject%20su%20Google%20AJAX%20Libraries%20API" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F11%2F14%2Fswfobject-su-google-ajax-libraries-api%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/google/" title="google" rel="tag">google</a>, <a href="http://www.undolog.com/tag/google-ajax-libraries-api/" title="Google AJAX Libraries API" rel="tag">Google AJAX Libraries API</a>, <a href="http://www.undolog.com/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/librerie/" title="librerie" rel="tag">librerie</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/swfobject/" title="SWFObject" rel="tag">SWFObject</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/10/03/wordpress-come-scrivere-un-reply-to-comment-usando-jquery/" title="Wordpress: come scrivere un reply to comment usando jQuery (3 ottobre, 2008)">Wordpress: come scrivere un reply to comment usando jQuery</a> (18)</li>
	<li><a href="http://www.undolog.com/2008/06/25/tecniche-di-text-replacement-in-flash/" title="Tecniche di Text Replacement in Flash (25 giugno, 2008)">Tecniche di Text Replacement in Flash</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/12/22/wordpress-plugin-flash-feed-scroll-reader/" title="Wordpress Plugin: Flash Feed Scroll Reader (22 dicembre, 2008)">Wordpress Plugin: Flash Feed Scroll Reader</a> (7)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/11/14/swfobject-su-google-ajax-libraries-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adobe Creative Suite 4: Roma 21 ottobre 2008</title>
		<link>http://www.undolog.com/2008/10/03/adobe-creative-suite-4-roma-21-ottobre-2008/</link>
		<comments>http://www.undolog.com/2008/10/03/adobe-creative-suite-4-roma-21-ottobre-2008/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 06:00:16 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Eventi & Iniziative]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe Fireworks]]></category>
		<category><![CDATA[Creative Suite]]></category>
		<category><![CDATA[CS4]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[eventi]]></category>
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=740</guid>
		<description><![CDATA[ 
Adobe è lieta di invitarti agli eventi di lancio della nuova Adobe Creative Suite 4. Ti aspettiamo a Roma il 21 Ottobre e a Milano il 30 Ottobre. Per tutti i dettagli dell'incontro vai al minisito dedicato agli eventi CS4! In omaggio per tutti i partecipanti la t-shirt CS4!

Io cercherò di esserci... soprattutto per [...]]]></description>
			<content:encoded><![CDATA[<p class="center"><a href="http://www.adobe.com/it/special/cs4eventi/onstage/registrazione.html"><img border="0" height="171" alt="Adobe Creative Suite 4: Roma 21 ottobre 2008" src="http://www.undolog.com/wp-content/uploads/2008/10/image.png" width="321" border="0"></a> </p>
<blockquote><p><em>Adobe è lieta di invitarti agli eventi di lancio della nuova Adobe Creative Suite 4. Ti aspettiamo a Roma il 21 Ottobre e a Milano il 30 Ottobre. Per tutti i dettagli dell'incontro vai al minisito dedicato agli eventi CS4! In omaggio per tutti i partecipanti la t-shirt CS4!</em></p>
</blockquote>
<p>Io cercherò di esserci... soprattutto per la maglietta <img src='http://www.undolog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;bodytext=%20%20%20Adobe%20%C3%A8%20lieta%20di%20invitarti%20agli%20eventi%20di%20lancio%20della%20nuova%20Adobe%20Creative%20Suite%204.%20Ti%20aspettiamo%20a%20Roma%20il%2021%20Ottobre%20e%20a%20Milano%20il%2030%20Ottobre.%20Per%20tutti%20i%20dettagli%20dell%27incontro%20vai%20al%20minisito%20dedicato%20agli%20eventi%20CS4%21%20In%20omaggio%20per%20tutti%20i%20" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;notes=%20%20%20Adobe%20%C3%A8%20lieta%20di%20invitarti%20agli%20eventi%20di%20lancio%20della%20nuova%20Adobe%20Creative%20Suite%204.%20Ti%20aspettiamo%20a%20Roma%20il%2021%20Ottobre%20e%20a%20Milano%20il%2030%20Ottobre.%20Per%20tutti%20i%20dettagli%20dell%27incontro%20vai%20al%20minisito%20dedicato%20agli%20eventi%20CS4%21%20In%20omaggio%20per%20tutti%20i%20" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;t=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;annotation=%20%20%20Adobe%20%C3%A8%20lieta%20di%20invitarti%20agli%20eventi%20di%20lancio%20della%20nuova%20Adobe%20Creative%20Suite%204.%20Ti%20aspettiamo%20a%20Roma%20il%2021%20Ottobre%20e%20a%20Milano%20il%2030%20Ottobre.%20Per%20tutti%20i%20dettagli%20dell%27incontro%20vai%20al%20minisito%20dedicato%20agli%20eventi%20CS4%21%20In%20omaggio%20per%20tutti%20i%20" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;headline=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=%20%20%20Adobe%20%C3%A8%20lieta%20di%20invitarti%20agli%20eventi%20di%20lancio%20della%20nuova%20Adobe%20Creative%20Suite%204.%20Ti%20aspettiamo%20a%20Roma%20il%2021%20Ottobre%20e%20a%20Milano%20il%2030%20Ottobre.%20Per%20tutti%20i%20dettagli%20dell%27incontro%20vai%20al%20minisito%20dedicato%20agli%20eventi%20CS4%21%20In%20omaggio%20per%20tutti%20i%20" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;t=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F&amp;title=Adobe%20Creative%20Suite%204%3A%20Roma%2021%20ottobre%202008" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F10%2F03%2Fadobe-creative-suite-4-roma-21-ottobre-2008%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/adobe/" title="Adobe" rel="tag">Adobe</a>, <a href="http://www.undolog.com/tag/adobe-fireworks/" title="Adobe Fireworks" rel="tag">Adobe Fireworks</a>, <a href="http://www.undolog.com/tag/creative-suite/" title="Creative Suite" rel="tag">Creative Suite</a>, <a href="http://www.undolog.com/tag/cs4/" title="CS4" rel="tag">CS4</a>, <a href="http://www.undolog.com/tag/dreamweaver/" title="Dreamweaver" rel="tag">Dreamweaver</a>, <a href="http://www.undolog.com/tag/eventi/" title="eventi" rel="tag">eventi</a>, <a href="http://www.undolog.com/category/eventi-iniziative/" title="Eventi &amp; Iniziative" rel="tag">Eventi &amp; Iniziative</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/photoshop/" title="Photoshop" rel="tag">Photoshop</a>, <a href="http://www.undolog.com/category/software/" title="Software" rel="tag">Software</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tecnologia/" title="Tecnologia" rel="tag">Tecnologia</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/03/02/net-software/" title="Net Software (2 marzo, 2007)">Net Software</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/04/10/unobtrusive-flash-objects/" title="Unobtrusive Flash Objects (10 aprile, 2007)">Unobtrusive Flash Objects</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/03/18/rinascono-gli-elementi-di-undologcom/" title="Rinascono gli elementi di undolog.com (18 marzo, 2008)">Rinascono gli elementi di undolog.com</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/10/03/adobe-creative-suite-4-roma-21-ottobre-2008/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Undolibrary MatrixArray: un&#8217;estensione della classe Array</title>
		<link>http://www.undolog.com/2008/09/15/undolibrary-matrixarray-unestensione-della-classe-array/</link>
		<comments>http://www.undolog.com/2008/09/15/undolibrary-matrixarray-unestensione-della-classe-array/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 13:35:34 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Google Code]]></category>
		<category><![CDATA[Matrici]]></category>
		<category><![CDATA[Matrix]]></category>
		<category><![CDATA[MatrixArray]]></category>
		<category><![CDATA[Undolibrary]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=658</guid>
		<description><![CDATA[MatrixArray è un'estensione della classe Array di Actionscript 3.0, con lo scopo di semplificare la manipolazione di Array lineari usati come matrice n x m. Questa classe fa parte della libreria Undolibrary (nel package undolibrary.utils.MatrixArray) che potete scaricaricare liberamente da Google code tramite un qualsiasi client SVN (Subversion) all'indirizzo:
svn checkout http://undolibrary.googlecode.com/svn/trunk/
In alternativa potete scaricare il [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://code.google.com/p/undolibrary/source/browse/trunk/as3/undolibrary/utils/MatrixArray.as"><code>MatrixArray</code></a> è un'estensione della classe <code>Array</code> di Actionscript 3.0, con lo scopo di semplificare la manipolazione di <code>Array</code> lineari usati come matrice <em>n</em> x <em>m</em>. Questa classe fa parte della libreria <a href="http://code.google.com/p/undolibrary/" target="_blank">Undolibrary</a> (nel package <code>undolibrary.utils.MatrixArray</code>) che potete scaricaricare liberamente da Google code tramite un qualsiasi client SVN (Subversion) all'indirizzo:<br />
<code>svn checkout http://undolibrary.googlecode.com/svn/trunk/</code><br />
In alternativa potete scaricare il solo file <a href="http://undolibrary.googlecode.com/svn/trunk/as3/undolibrary/utils/MatrixArray.as" target="_blank">MatrixArray.as</a>. Un'esempio dell'uso di matrici lineari è stato dato in <a href="http://www.undolog.com/2008/09/03/actionscript-30-for-beginners-lesson-2/"><em>Actionscript 3.0 for beginners: lesson #2</em></a> dove abbiamo visto un suo semplice uso nella realizzazione del classico game Tic Tac Toe. Una matrice di questo tipo è paragonabile ad un'area rettangolare (<code>w</code>x<code>h</code>), proprio come una scacchiera. Con questa classe è possibile trattare una matrice di questo tipo proprio come un reticolo con delle sue coordinate <em>x</em> ed <em>y</em>. La <a target="_blank" href="http://code.google.com/p/undolibrary/source/browse/trunk/as3/undolibrary/utils/MatrixArray.as"><code>MatrixArray</code></a> l'ho usata, ad esempio, nello sviluppo di tutta la logica dell'editor di Emotions Icons per Skype: <a href="http://www.skypemote.com" target="_blank">Skypemote</a>.</p>
<p><span id="more-658"></span></p>
<h4>Metodi</h4>
<p>La classe <a target="_blank" href="http://code.google.com/p/undolibrary/source/browse/trunk/as3/undolibrary/utils/MatrixArray.as"><code>MatrixArray</code></a> estende quindi la normale classe <code>Array</code> aggiungendo una serie di utili metodi per gestire e manipolare matrici <em>n</em> x <em>m</em>. Per creare una matrice <em>n</em> x <em>m</em> è sufficente usare:</p>
<div class="igBar"><span id="lactionscript3-42"><a href="#" onclick="javascript:showCodeTxt('actionscript3-42'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-42">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// importanzione della classe - se avete scaricato l'intera libreria Undolibrary</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// in alternativa potete scaricare solo il file MatrixArray.as e usarlo da solo</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> undolibrary<span style="color: #000066; font-weight: bold;">.</span>utils<span style="color: #000066; font-weight: bold;">.</span>MatrixArray<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">//</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> ma<span style="color: #000066; font-weight: bold;">:</span>MatrixArray = <span style="color: #0033ff; font-weight: bold;">new</span> MatrixArray<span style="color: #000000;">&#40;</span>10<span style="color: #000066; font-weight: bold;">,</span> 10<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Creata la matrice 10x10, come nel precedente esempio, possiamo manipolarla con utili metodi che rendono il nostro lavoro estremamente più rapido e semplice. In effetti la matrice 10x10 non è altro che un semplice Array lineare di 100 elementi!</p>
<h4>clip()</h4>
<div class="igBar"><span id="lactionscript3-43"><a href="#" onclick="javascript:showCodeTxt('actionscript3-43'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-43">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Restitusice un porzione rettangolare della matrice nella forma MatrixArray</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @param &nbsp; &nbsp;(uint) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sx Coordina x del taglio</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @param &nbsp; &nbsp;(uint) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sy Coordina y del taglio</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @param &nbsp; &nbsp;(uint) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cw Dimensione orizzontale del taglio</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @param &nbsp; &nbsp;(uint) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ch Dimensione verticale del taglio</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @result &nbsp; &nbsp;(MatrixArray) &nbsp; &nbsp;Una nuova matrice cw x ch</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">clip<span style="color: #000000;">&#40;</span>sx<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> sy<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> cw<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> ch<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>MatrixArray</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// esempio</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// crea una nuova MatrixArray dalle coordinate 2,2 e larga e alta 5</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> nma<span style="color: #000066; font-weight: bold;">:</span>MatrixArray = ma<span style="color: #000066; font-weight: bold;">.</span>clip<span style="color: #000000;">&#40;</span>2<span style="color: #000066; font-weight: bold;">,</span> 2<span style="color: #000066; font-weight: bold;">,</span> 5<span style="color: #000066; font-weight: bold;">,</span> 5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>fill()</h4>
<div class="igBar"><span id="lactionscript3-44"><a href="#" onclick="javascript:showCodeTxt('actionscript3-44'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-44">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Riempie la matrice con un determinato valore</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @param &nbsp; &nbsp;(any) &nbsp; &nbsp;Valore da inserire nella matrice</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fill<span style="color: #000000;">&#40;</span>v<span style="color: #000066; font-weight: bold;">:*</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>paintChar()</h4>
<div class="igBar"><span id="lactionscript3-45"><a href="#" onclick="javascript:showCodeTxt('actionscript3-45'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-45">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/** </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Riempie la matrice con un (solo) carattere prelevato da una stringa</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* di lunghezza pari alle dimensioni della matrice stessa</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @param &nbsp; &nbsp;(string) &nbsp; &nbsp;v Stringa con la serie di caratteri da mappare</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* @result &nbsp; &nbsp;(boolean) &nbsp; &nbsp;true ok, false errore: stringa di lunghezza errata</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">paintChar<span style="color: #000000;">&#40;</span>v<span style="color: #000066; font-weight: bold;">:</span>string<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// esempio</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> ma<span style="color: #000066; font-weight: bold;">:</span>MatrixArray = <span style="color: #0033ff; font-weight: bold;">new</span> MatrixArray<span style="color: #000000;">&#40;</span>10<span style="color: #000066; font-weight: bold;">,</span>5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ma<span style="color: #000066; font-weight: bold;">.</span>paintChar<span style="color: #000000;">&#40;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**********'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**##**##**'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**********'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**#####**'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**********'</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>flipH(), flipV()</h4>
<div class="igBar"><span id="lactionscript3-46"><a href="#" onclick="javascript:showCodeTxt('actionscript3-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-46">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Esegue un'operazione di riflessione orizziontale(flipH) o </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* vertical (flipV) direttamente sulla matrice</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">flipH<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">flipV<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>move()</h4>
<div class="igBar"><span id="lactionscript3-47"><a href="#" onclick="javascript:showCodeTxt('actionscript3-47'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-47">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Sposta il contenuto della matrice (eseguendo uno shift) nelle quattro</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* direzione di un offeset prestabilito</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">move<span style="color: #000000;">&#40;</span>ox<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a><span style="color: #000066; font-weight: bold;">,</span> oy<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">//</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> ma<span style="color: #000066; font-weight: bold;">:</span>MatrixArray = <span style="color: #0033ff; font-weight: bold;">new</span> MatrixArray<span style="color: #000000;">&#40;</span>10<span style="color: #000066; font-weight: bold;">,</span>5<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ma<span style="color: #000066; font-weight: bold;">.</span>paintChar<span style="color: #000000;">&#40;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**********'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**##**##**'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**********'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**#####**'</span><span style="color: #000066; font-weight: bold;">+</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #990000;">'**********'</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">ma<span style="color: #000066; font-weight: bold;">.</span>move<span style="color: #000000;">&#40;</span>2<span style="color: #000066; font-weight: bold;">,</span>4<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// output</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">****</span>##<span style="color: #000066; font-weight: bold;">**</span>##</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">**********</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">****</span>#####</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">**********</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">**********</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>peek()</h4>
<div class="igBar"><span id="lactionscript3-48"><a href="#" onclick="javascript:showCodeTxt('actionscript3-48'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-48">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Restituisce il contenuto della matrice alle coordinate x, y</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">peek<span style="color: #000000;">&#40;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:*</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>poke()</h4>
<div class="igBar"><span id="lactionscript3-49"><a href="#" onclick="javascript:showCodeTxt('actionscript3-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-49">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Imposta il contenuto della matrice alle coordinate x, y</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">poke<span style="color: #000000;">&#40;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h4>getString()</h4>
<div class="igBar"><span id="lactionscript3-50"><a href="#" onclick="javascript:showCodeTxt('actionscript3-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-50">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/**</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;* Usato spesso per il debug restituisce la matrice nxm come stringa</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">&nbsp;*/</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">getString<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;bodytext=MatrixArray%20%C3%A8%20un%27estensione%20della%20classe%20Array%20di%20Actionscript%203.0%2C%20con%20lo%20scopo%20di%20semplificare%20la%20manipolazione%20di%20Array%20lineari%20usati%20come%20matrice%20n%20x%20m.%20Questa%20classe%20fa%20parte%20della%20libreria%20Undolibrary%20%28nel%20package%20undolibrary.utils.MatrixArray" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;notes=MatrixArray%20%C3%A8%20un%27estensione%20della%20classe%20Array%20di%20Actionscript%203.0%2C%20con%20lo%20scopo%20di%20semplificare%20la%20manipolazione%20di%20Array%20lineari%20usati%20come%20matrice%20n%20x%20m.%20Questa%20classe%20fa%20parte%20della%20libreria%20Undolibrary%20%28nel%20package%20undolibrary.utils.MatrixArray" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;t=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;annotation=MatrixArray%20%C3%A8%20un%27estensione%20della%20classe%20Array%20di%20Actionscript%203.0%2C%20con%20lo%20scopo%20di%20semplificare%20la%20manipolazione%20di%20Array%20lineari%20usati%20come%20matrice%20n%20x%20m.%20Questa%20classe%20fa%20parte%20della%20libreria%20Undolibrary%20%28nel%20package%20undolibrary.utils.MatrixArray" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;headline=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=MatrixArray%20%C3%A8%20un%27estensione%20della%20classe%20Array%20di%20Actionscript%203.0%2C%20con%20lo%20scopo%20di%20semplificare%20la%20manipolazione%20di%20Array%20lineari%20usati%20come%20matrice%20n%20x%20m.%20Questa%20classe%20fa%20parte%20della%20libreria%20Undolibrary%20%28nel%20package%20undolibrary.utils.MatrixArray" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;t=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F&amp;title=Undolibrary%20MatrixArray%3A%20un%27estensione%20della%20classe%20Array" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F09%2F15%2Fundolibrary-matrixarray-unestensione-della-classe-array%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/array/" title="Array" rel="tag">Array</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/google-code/" title="Google Code" rel="tag">Google Code</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/matrici/" title="Matrici" rel="tag">Matrici</a>, <a href="http://www.undolog.com/tag/matrix/" title="Matrix" rel="tag">Matrix</a>, <a href="http://www.undolog.com/tag/matrixarray/" title="MatrixArray" rel="tag">MatrixArray</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tecnologia/" title="Tecnologia" rel="tag">Tecnologia</a>, <a href="http://www.undolog.com/tag/undolibrary/" title="Undolibrary" rel="tag">Undolibrary</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/06/04/flash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip/" title="Flash CS3: creare un effetto Reflex su qualsiasi MovieClip (4 giugno, 2008)">Flash CS3: creare un effetto Reflex su qualsiasi MovieClip</a> (12)</li>
	<li><a href="http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/" title="Very short snippet: shuffle() in Javascript e Actionscript (16 febbraio, 2009)">Very short snippet: shuffle() in Javascript e Actionscript</a> (3)</li>
	<li><a href="http://www.undolog.com/2008/02/01/yahoo-astra-suite-di-componenti-per-flash-e-flex/" title="Yahoo! ASTRA: suite di componenti per Flash e Flex (1 febbraio, 2008)">Yahoo! ASTRA: suite di componenti per Flash e Flex</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/04/02/very-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle/" title="Very short snippet: estendere un array Actionscript con il metodo shuffle() (2 aprile, 2009)">Very short snippet: estendere un array Actionscript con il metodo shuffle()</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/05/28/undolibrary-libreria-actionscript-30-su-google-code/" title="undolibrary: libreria Actionscript 3.0 su Google Code (28 maggio, 2008)">undolibrary: libreria Actionscript 3.0 su Google Code</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/09/15/undolibrary-matrixarray-unestensione-della-classe-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Considerazioni sull&#8217;evoluzione dei linguaggi di svilluppo: AS2 vs AS3</title>
		<link>http://www.undolog.com/2008/08/05/considerazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3/</link>
		<comments>http://www.undolog.com/2008/08/05/considerazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 13:54:38 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[ECMA]]></category>
		<category><![CDATA[Lingo]]></category>
		<category><![CDATA[linguaggi-di-sviluppo]]></category>
		<category><![CDATA[Microsoft Visual Basic]]></category>
		<category><![CDATA[Porting]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=500</guid>
		<description><![CDATA[Leggendo l'articolo di Julius ActionScript 2 o ActionScript 3? Facciamo chiarezza!&#160;vorrei fare alcune considerazioni sull'evoluzione &#34;inversa&#34; di alcuni strumenti di sviluppo per chi, come me, viene dalla programmazione C/C++.
Una caratteristica comune - negli ultimi anni - di alcuni ambienti di sviluppo &#232; quella di raffinare la sinstassi del proprio linguaggio con il tempo. Si parte [...]]]></description>
			<content:encoded><![CDATA[<p>Leggendo l'articolo di <a title="Julius" href="http://www.juliusdesign.net/" target="_blank">Julius</a> <a title="ActionScript 2 o ActionScript 3? Facciamo chiarezza!" href="http://www.juliusdesign.net/actionscript-2-o-actionscript-3-facciamo-chiarezza/" target="_blank"><em>ActionScript 2 o ActionScript 3? Facciamo chiarezza!</em></a><em>&#160;</em>vorrei fare alcune considerazioni <strong>sull'evoluzione &quot;inversa&quot;</strong> di alcuni strumenti di sviluppo per chi, come me, viene dalla programmazione C/C++.</p>
<p>Una caratteristica comune - negli ultimi anni - di alcuni ambienti di sviluppo &#232; quella di raffinare la sinstassi del proprio linguaggio con il tempo. Si parte da un linguaggio ad alto livello, come il <strong>Lingo di Macromedia Director</strong>, <strong>Actionscript 1.0</strong> delle prime versioni di Flash o <strong>Microsoft Visual Basic 3</strong> per arrivare ad allinearsi con il tempo alle specifiche e alle - ormai consolidate - sintassi dettate dallo standard ECMA. Anche se paragonare un Microsoft Visual Basic 3 con Javascript o Actionscript non &#232; del tutto corretto, entrambe le situazioni denotano una chiara evoluzione &quot;inversa&quot; rispetto agli albori della codifica di programmazione.    <br />Unica eccezione, forse, in questo scenario, sono soluzioni come <strong>Java</strong> o <strong>PHP</strong>, entrambi con radici fortemente orientate al C/C++.</p>
<p>Concentrandoci su Actionscript, &#232; chiara la volont&#224; della casa prodruttrice (ora Adobe) ad allineare il linguaggio di Flash allo standard ECMA. Usare ancora Actionscript 2.0 non porta nessun concreto vataggio allo sviluppatore, soprattutto a chi non possiede le conoscenze di base proprie del C/C++. Aggiungere patch a vecchi progetti, senza doverli &quot;portare&quot; (riscrivere) in base alle ultimi release, ha un senso in un'ottica di economia. Tuttavia sarebbe utile imparare subito, quando si presenta l'occasione, le &quot;nuove&quot; sintassi proposte dagli aggiornamenti degli ambienti di sviluppo. Pi&#249; si attende e peggio sar&#224;!</p>
<p>Apprendere Actionscript 3.0, per chi viene dal C/C++, &#232; pi&#249; come &quot;disapprendere&quot; (o disimparare), le vecchie &quot;clausule&quot;, forzate e non standard, presenti nelle precendenti versioni. Stessa cosa accadr&#224; con l'uscita di Flash CS4; evitare, quindi, di rimanere indietro.</p>
<p>Inoltre, lo standard, rende la <strong>portabilit&#224; del codice</strong> estremamente pi&#249; fattibile e concreta. La <strong>similitudine</strong> tra PHP, Javascript e Actionscript 3.0, evita di dover rivedere pesantamente codici e algoritmi scritti in uno solo di questi linguaggi.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;bodytext=Leggendo%20l%27articolo%20di%20Julius%20ActionScript%202%20o%20ActionScript%203%3F%20Facciamo%20chiarezza%21%26%23160%3Bvorrei%20fare%20alcune%20considerazioni%20sull%27evoluzione%20%26quot%3Binversa%26quot%3B%20di%20alcuni%20strumenti%20di%20sviluppo%20per%20chi%2C%20come%20me%2C%20viene%20dalla%20programmazione%20C%2FC%2B%2B.%20%20Una%20car" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;notes=Leggendo%20l%27articolo%20di%20Julius%20ActionScript%202%20o%20ActionScript%203%3F%20Facciamo%20chiarezza%21%26%23160%3Bvorrei%20fare%20alcune%20considerazioni%20sull%27evoluzione%20%26quot%3Binversa%26quot%3B%20di%20alcuni%20strumenti%20di%20sviluppo%20per%20chi%2C%20come%20me%2C%20viene%20dalla%20programmazione%20C%2FC%2B%2B.%20%20Una%20car" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;t=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;annotation=Leggendo%20l%27articolo%20di%20Julius%20ActionScript%202%20o%20ActionScript%203%3F%20Facciamo%20chiarezza%21%26%23160%3Bvorrei%20fare%20alcune%20considerazioni%20sull%27evoluzione%20%26quot%3Binversa%26quot%3B%20di%20alcuni%20strumenti%20di%20sviluppo%20per%20chi%2C%20come%20me%2C%20viene%20dalla%20programmazione%20C%2FC%2B%2B.%20%20Una%20car" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;headline=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Leggendo%20l%27articolo%20di%20Julius%20ActionScript%202%20o%20ActionScript%203%3F%20Facciamo%20chiarezza%21%26%23160%3Bvorrei%20fare%20alcune%20considerazioni%20sull%27evoluzione%20%26quot%3Binversa%26quot%3B%20di%20alcuni%20strumenti%20di%20sviluppo%20per%20chi%2C%20come%20me%2C%20viene%20dalla%20programmazione%20C%2FC%2B%2B.%20%20Una%20car" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;t=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F&amp;title=Considerazioni%20sull%27evoluzione%20dei%20linguaggi%20di%20svilluppo%3A%20AS2%20vs%20AS3" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F08%2F05%2Fconsiderazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript-20/" title="Actionscript 2.0" rel="tag">Actionscript 2.0</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/as2/" title="AS2" rel="tag">AS2</a>, <a href="http://www.undolog.com/tag/as3/" title="AS3" rel="tag">AS3</a>, <a href="http://www.undolog.com/tag/cc/" title="C/C++" rel="tag">C/C++</a>, <a href="http://www.undolog.com/tag/ecma/" title="ECMA" rel="tag">ECMA</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/lingo/" title="Lingo" rel="tag">Lingo</a>, <a href="http://www.undolog.com/tag/linguaggi-di-sviluppo/" title="linguaggi-di-sviluppo" rel="tag">linguaggi-di-sviluppo</a>, <a href="http://www.undolog.com/tag/microsoft-visual-basic/" title="Microsoft Visual Basic" rel="tag">Microsoft Visual Basic</a>, <a href="http://www.undolog.com/category/sviluppo/internet/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.undolog.com/tag/porting/" title="Porting" rel="tag">Porting</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2009/02/16/very-short-snippet-shuffle-in-javascript-e-actionscript/" title="Very short snippet: shuffle() in Javascript e Actionscript (16 febbraio, 2009)">Very short snippet: shuffle() in Javascript e Actionscript</a> (3)</li>
	<li><a href="http://www.undolog.com/2009/04/02/very-short-snippet-estendere-un-array-actionscript-con-il-metodo-shuffle/" title="Very short snippet: estendere un array Actionscript con il metodo shuffle() (2 aprile, 2009)">Very short snippet: estendere un array Actionscript con il metodo shuffle()</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/06/13/tips-tricks-generatore-01-con-loperatore-ternario/" title="Tips &amp; Tricks: generatore 0/1 con l&#8217;operatore ternario (13 giugno, 2007)">Tips &amp; Tricks: generatore 0/1 con l&#8217;operatore ternario</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/03/02/net-software/" title="Net Software (2 marzo, 2007)">Net Software</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/08/05/considerazioni-sullevoluzione-dei-linguaggi-di-svilluppo-as2-vs-as3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Shadowbox 2.0: la release candidate 1</title>
		<link>http://www.undolog.com/2008/07/08/shadowbox-20-la-release-candidate-1/</link>
		<comments>http://www.undolog.com/2008/07/08/shadowbox-20-la-release-candidate-1/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 12:25:14 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[FLV]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IFRAME]]></category>
		<category><![CDATA[quicktime]]></category>
		<category><![CDATA[shadowbox]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=457</guid>
		<description><![CDATA[ &#200; stata rilasciata la release candidate 1 (rc1) della versione 2.0 della libreria Javascript Shadowbox, di Michael J. I. Jackson, utilissima per aprire finestre dedicate alla visualizzazioni di vari tipi di media, da Flash a QuickTime a pagine HTML. In questa nuova versione troviamo:

Il sito &#232; pi&#249; ricco di informazioni e include ora un [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Shadowbox" href="http://mjijackson.com/shadowbox/index.html" target="_blank"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 5px 10px 0px 0px; border-right-width: 0px" height="66" alt="shadowbox" src="http://www.undolog.com/wp-content/uploads/2008/07/shadowbox.png" width="237" align="left" border="0" /></a> &#200; stata rilasciata la <strong>release candidate</strong> 1 (rc1) della versione 2.0 della libreria Javascript <a title="Shadowbox" href="http://mjijackson.com/shadowbox/index.html" target="_blank">Shadowbox</a>, di <a href="http://www.mjijackson.com">Michael J. I. Jackson</a>, utilissima per aprire finestre dedicate alla visualizzazioni di vari tipi di media, da Flash a QuickTime a pagine HTML. In questa nuova versione troviamo:</p>
<ul>
<li>Il sito &#232; pi&#249; ricco di informazioni e include ora un <a title="wizard" href="http://mjijackson.com/shadowbox/doc/download.html" target="_blank">wizard</a> (sullo stile di mootools) per creare &quot;al volo&quot; un pacchetto della libreria personalizzato alle nostre esigenze </li>
<li>Possibilit&#224; di usare un <a title="modulo standalone" href="http://mjijackson.com/shadowbox/doc/usage.html#adapter" target="_blank">modulo standalone</a> base, senza includere necessariamente - gli adattatori per le - librerie esterne come prototype.js, jQuery, etc... </li>
<li>Miglioramenti alla gestione e realizzazione delle <a title="Skin" href="http://mjijackson.com/shadowbox/doc/usage.html#skin" target="_blank">Skin</a> </li>
<li><a title="Localizzazione" href="http://mjijackson.com/shadowbox/doc/usage.html#language" target="_blank">Localizzazione</a></li>
</ul>
<p>La libreria &#232; disponibile anche su <strong>SVN</strong> all'indirizzo:</p>
<p>
<pre><strong>http://michaeljackson.googlecode.com/svn/trunk/shadowbox</strong></pre></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;bodytext=%20%26%23200%3B%20stata%20rilasciata%20la%20release%20candidate%201%20%28rc1%29%20della%20versione%202.0%20della%20libreria%20Javascript%20Shadowbox%2C%20di%20Michael%20J.%20I.%20Jackson%2C%20utilissima%20per%20aprire%20finestre%20dedicate%20alla%20visualizzazioni%20di%20vari%20tipi%20di%20media%2C%20da%20Flash%20a%20QuickTime%20a%20pagine%20" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;notes=%20%26%23200%3B%20stata%20rilasciata%20la%20release%20candidate%201%20%28rc1%29%20della%20versione%202.0%20della%20libreria%20Javascript%20Shadowbox%2C%20di%20Michael%20J.%20I.%20Jackson%2C%20utilissima%20per%20aprire%20finestre%20dedicate%20alla%20visualizzazioni%20di%20vari%20tipi%20di%20media%2C%20da%20Flash%20a%20QuickTime%20a%20pagine%20" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;t=Shadowbox%202.0%3A%20la%20release%20candidate%201" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;annotation=%20%26%23200%3B%20stata%20rilasciata%20la%20release%20candidate%201%20%28rc1%29%20della%20versione%202.0%20della%20libreria%20Javascript%20Shadowbox%2C%20di%20Michael%20J.%20I.%20Jackson%2C%20utilissima%20per%20aprire%20finestre%20dedicate%20alla%20visualizzazioni%20di%20vari%20tipi%20di%20media%2C%20da%20Flash%20a%20QuickTime%20a%20pagine%20" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Shadowbox%202.0%3A%20la%20release%20candidate%201%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;headline=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=%20%26%23200%3B%20stata%20rilasciata%20la%20release%20candidate%201%20%28rc1%29%20della%20versione%202.0%20della%20libreria%20Javascript%20Shadowbox%2C%20di%20Michael%20J.%20I.%20Jackson%2C%20utilissima%20per%20aprire%20finestre%20dedicate%20alla%20visualizzazioni%20di%20vari%20tipi%20di%20media%2C%20da%20Flash%20a%20QuickTime%20a%20pagine%20" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;t=Shadowbox%202.0%3A%20la%20release%20candidate%201" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Shadowbox%202.0%3A%20la%20release%20candidate%201&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F&amp;title=Shadowbox%202.0%3A%20la%20release%20candidate%201" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F07%2F08%2Fshadowbox-20-la-release-candidate-1%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/internet/ajax/" title="Ajax" rel="tag">Ajax</a>, <a href="http://www.undolog.com/category/sviluppo/internet/css/" title="CSS" rel="tag">CSS</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flv/" title="FLV" rel="tag">FLV</a>, <a href="http://www.undolog.com/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://www.undolog.com/tag/iframe/" title="IFRAME" rel="tag">IFRAME</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/jquery-javascript-internet-sviluppo/" title="jQuery" rel="tag">jQuery</a>, <a href="http://www.undolog.com/tag/quicktime/" title="quicktime" rel="tag">quicktime</a>, <a href="http://www.undolog.com/tag/shadowbox/" title="shadowbox" rel="tag">shadowbox</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/07/12/unobtrusive-lightwindow-20/" title="Unobtrusive LightWindow 2.0 (12 luglio, 2007)">Unobtrusive LightWindow 2.0</a> (0)</li>
	<li><a href="http://www.undolog.com/2009/04/10/shadowbox-30-beta/" title="Shadowbox 3.0 beta (10 aprile, 2009)">Shadowbox 3.0 beta</a> (1)</li>
	<li><a href="http://www.undolog.com/2007/03/17/dove-javascript-vince/" title="Dove Javascript vince (17 marzo, 2007)">Dove Javascript vince</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/07/08/shadowbox-20-la-release-candidate-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tecniche di Text Replacement in Flash</title>
		<link>http://www.undolog.com/2008/06/25/tecniche-di-text-replacement-in-flash/</link>
		<comments>http://www.undolog.com/2008/06/25/tecniche-di-text-replacement-in-flash/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 08:38:18 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Grafica & Design]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Google AJAX API]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Progressive-Enhancement]]></category>
		<category><![CDATA[Prototype.js]]></category>
		<category><![CDATA[SWFObject]]></category>
		<category><![CDATA[Text Replacement]]></category>
		<category><![CDATA[Unobtrusive]]></category>
		<category><![CDATA[Unobtrusive-JavaScript]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=438</guid>
		<description><![CDATA[La tecnica di Text Replacement che presento oggi è, per certi aspetti, davvero interessante. A differenza della classica sostituizione per immagine tramite CSS, questa tecnica usa un filmato Flash per sovrascrivere i titoli del nostro sito. Nonostante sia un pochino più articolata, in quanto richiede la creazione di un filmato Flash e l'uso di Javascript, [...]]]></description>
			<content:encoded><![CDATA[<p>La <a rel="shadowbox;width=800;height=600;title=Esempio di sostituzione tramite Flash" href="/wp-content/uploads/2008/06/textreplacement.html">tecnica di Text Replacement</a> che presento oggi è, per certi aspetti, davvero interessante. A differenza della <a href="http://www.undolog.com/2008/06/23/tecniche-di-text-replacement-in-htmlcss/trackback/">classica sostituizione per immagine tramite CSS</a>, questa tecnica <strong>usa un filmato Flash</strong> per sovrascrivere i titoli del nostro sito. Nonostante sia un pochino più articolata, in quanto richiede la creazione di un filmato Flash e l'uso di Javascript, permette di ottenere una serie di vantaggi non indifferenti:</p>
<ul>
<li>Mantiene l'<strong>accessibilità </strong>del sito sfruttando un <a href="http://www.undolog.com/2008/04/13/unobtrusive-javascript-un-po-di-chiarezza-e-occhio-agli-impostori/trackback/">True-Unobtrusive-Javascript</a> in modo che crawler e spider continuino a vedere la pagina come semplice e corretto HTML</li>
<li>Non richiede la creazione di <em>n</em> immagini per <em>n</em> titoli. Basta un solo filmato per sostituire tutti i titoli del nostro sito, con un notevole risparmio in termini di Download</li>
<li>Permette di creare anche titoli semplici ma con <strong>Font</strong> normalmente non utilizzati sul Web</li>
<li>Il testo può essere reso in <strong>HTML</strong>, grazie alle caratteristiche di Flash</li>
<li>Il testo è <strong>selezionabile</strong></li>
<li>Essendo un filmato Flash si può inserire interattività e animazioni di qualsiasi sorta</li>
</ul>
<p>Noterete, anche, che in questa procedura i CSS non sono praticamente presi in considerazione!</p>
<p><span id="more-438"></span></p>
<h4>Gli strumenti che useremo</h4>
<p>Prima di procedere vediamo di cosa abbiamo bisogno per utilizzare questa tecnica.</p>
<ul>
<li><a target="_blank" href="http://www.adobe.com/products/flash/">Adobe Flash</a> per la creazione del filmato che prenderà il posto del nostro titolo</li>
<li>La libreria <a target="_blank" href="http://blog.deconcept.com/swfobject/">SWFObject</a> per l'inserimento - dinamico - del filmato (Unobtrusive)</li>
<li>La libreria <a target="_blank" href="http://www.prototypejs.org/">prototype.js</a> per automatizzare il tutto; io userò negli esempi il nuovo loader di <a href="http://www.undolog.com/2008/05/29/google-ajax-library-api-una-svolta-per-gli-sviluppatori/trackback/">Google AJAX Library API</a> ma se volete potete includere <a target="_blank" href="http://www.prototypejs.org/">prototype.js</a> per conto vostro separatamente</li>
</ul>
<p>A parte Flash, gli altri strumenti sono sostituibili da funzioni personali o altre soluzioni.</p>
<h4>Il filmato Flash</h4>
<p>Immaginiamo di voler realizzare un titolo con un Font particolare, cosa che rende i CSS inutili in quanto il problema è che tale Font potrebbe non essere installato sulla macchina dell'end-user e quindi non visualizzato dall'utente finale:</p>
<p class="center"><img src="/wp-content/uploads/2008/06/textreplacement.png" /></p>
<p>Apriamo Flash e creiamo un filmato con una dimensione simile a quella del titolo che vogliamo sostituire. Come vedremo non è importante la dimensione che imposteremo in design-time, questa potrà essere modificata successivamente senza alterare la resa del testo. Inseriamo un oggetto Testo:</p>
<p class="center"><img src="/wp-content/uploads/2008/06/textreplacement-2.png" /></p>
<p>Cliccate su "Incorpora" e selezionate:</p>
<p class="center"><img src="/wp-content/uploads/2008/06/textreplacement-3.png" /></p>
<p>Nel primo fotogramma inseriamo questo semplice e disarmante codice:</p>
<div class="igBar"><span id="lactionscript3-57"><a href="#" onclick="javascript:showCodeTxt('actionscript3-57'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-57">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// funziona a qualsiasi dimensione</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleMode</span> &nbsp;= <a href="http://www.google.com/search?q=stagescalemode%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stagescalemode.html"><span style="color: #004993;">StageScaleMode</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">NO_SCALE</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">align</span> = <a href="http://www.google.com/search?q=stagealign%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stagealign.html"><span style="color: #004993;">StageAlign</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">TOP_LEFT</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// preleva il parametro content passato da Javascript</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">label<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">htmlText</span> = <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span> == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">?</span><span style="color: #990000;">'Errore'</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">loaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Compiliamo pure il nostro filmato (textreplacement.swf) e passiamo quindi dalla marcatura HTML, usandone una già vista, così da massimizzare la compatibilià:</p>
<div class="igBar"><span id="lhtml-58"><a href="#" onclick="javascript:showCodeTxt('html-58'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-58">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Eh1.html"><span style="color: #000000; font-weight: bold;">&lt;h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;titolo_uno&quot;</span>&gt;&lt;span&gt;</span>Titolo uno<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;</span></a><span style="color: #66cc66;">/</span>span&gt;&lt;<span style="color: #66cc66;">/</span>h1&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nella sezione <code>head</code> del codice inseriamo:</p>
<div class="igBar"><span id="lhtml-59"><a href="#" onclick="javascript:showCodeTxt('html-59'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-59">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Escript.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;swfobject.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span>script&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Escript.html"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span><a href="http://december.com/html/4/element/%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;swfobject.embedSWF(&quot;textreplacement.swf&quot;, &quot;titolo_uno&quot;, &quot;544&quot;, &quot;50&quot;, &quot;9.0.0&quot;, null, {content: 'Titolo uno'});</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E%2Fscript%26amp%3Bgt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></a></span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Il TAG <code>h1</code> viene sostituito dal nostro filmato textreplacement.swf, con il parametro <code>content</code> che contiene la stringa del titolo. In una situazione più articolata, quindi con più titoli, questa soluzione diventa sconveniente, nonostante sia sempre più "avvincente" della mera sostituzione tramite i CSS: <a rel="shadowbox[textrepflash];width=800;height=600;title=Esempio di sostituzione tramite Flash" href="/wp-content/uploads/2008/06/textreplacement.html">clicca qui</a> per esempio (notare che il testo è selezionabile).</p>
<p>Il titolo due ha un contenuto HTML ed è reso dal motore Flash; scritta in rosso:</p>
<div class="igBar"><span id="ljavascript-60"><a href="#" onclick="javascript:showCodeTxt('javascript-60'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-60">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">swfobject.<span style="color: #660066;">embedSWF</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;textreplacement.swf&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;titolo_due&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;544&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;50&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;9.0.0&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>content<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Titolo &lt;font color=&quot;#ff0000&quot;&gt;due&lt;/font&gt;'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Per ogni titolo presente nella pagina, infatti, bisogna inserire una riga Javascript che indichi a SWFObject l'id e il contenuto del titolo da trattare. Utilizzando prototype.js ed inserendo una classe per intercettare i titoli da sostituire, possiamo scrivere una semplice funzione in grado di sostituire tutti i titoli nella pagina con il contenuto Flash, prelevando il parametro <code>content</code> direttamente dall'HTML: <a rel="shadowbox[textrepflash];width=800;height=600;title=Esempio di sostituzione tramite Flash" href="/wp-content/uploads/2008/06/textreplacementp.html">clicca qui</a> per esempio.</p>
<div class="igBar"><span id="lhtml-61"><a href="#" onclick="javascript:showCodeTxt('html-61'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-61">
<div class="html" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Eh1.html"><span style="color: #000000; font-weight: bold;">&lt;h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;titolo_uno&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text-replacement&quot;</span>&gt;&lt;span&gt;</span>Titolo uno<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;</span></a><span style="color: #66cc66;">/</span>span&gt;&lt;<span style="color: #66cc66;">/</span>h1&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Eh1.html"><span style="color: #000000; font-weight: bold;">&lt;h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;titolo_due&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text-replacement&quot;</span>&gt;&lt;span&gt;</span>Titolo due<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;</span></a><span style="color: #66cc66;">/</span>span&gt;&lt;<span style="color: #66cc66;">/</span>h1&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3Eh1.html"><span style="color: #000000; font-weight: bold;">&lt;h1</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;titolo_tre&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text-replacement&quot;</span>&gt;&lt;span&gt;</span>Sono il Titolo Tre un po' più complicato<span style="color: #009900;"><a href="http://december.com/html/4/element/%26amp%3Blt%3CSEMI%3E.html"><span style="color: #000000; font-weight: bold;">&lt;</span></a><span style="color: #66cc66;">/</span>span&gt;&lt;<span style="color: #66cc66;">/</span>h1&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="igBar"><span id="ljavascript-62"><a href="#" onclick="javascript:showCodeTxt('javascript-62'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-62">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">google.<span style="color: #660066;">setOnLoadCallback</span><span style="color: #009900;">&#40;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; $$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1.text-replacement'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swfobject.<span style="color: #660066;">embedSWF</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;textreplacement.swf&quot;</span><span style="color: #339933;">,</span> element.<span style="color: #660066;">id</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;544&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;50&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;9.0.0&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>content<span style="color: #339933;">:</span> element.<span style="color: #660066;">innerHTML</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In questo caso ho usato <code>google.setOnLoadCallback()</code> in quanto uso <a href="http://www.undolog.com/2008/05/29/google-ajax-library-api-una-svolta-per-gli-sviluppatori/trackback/">Google AJAX Library API</a> per caricare prototype.js. Vengono quindi intercettati tutti i TAG <code>h1</code> con classe impostata a <code>text-replacement</code>. A quel punto viene chiamato SWFObject per inserire sull'elemento trovato (<code>element.id</code>) il nostro filmato Flash. Notare che viene usato <code>element.innerHTML</code> per prelevare il contenuto testuale da passare al filmato Flash. Così facendo si passa in realtà il TAG <code>span</code> ma questo non è un probelma avendo impostato in campo testo nel filmato Flash come HTML.</p>
<p>Flash, poi, permette tutta una serie di effetti (runtime) che rendono questa tecnica davvero "simpatica": <a rel="shadowbox[textrepflash];width=800;height=600;title=Esempio di sostituzione tramite Flash" href="/wp-content/uploads/2008/06/textreplacemente.html">clicca qui</a> per esempio.</p>
<p>Quello che ho presentato è ovviamente un semplice esempio! Tuttavia il codice Javascript e le taggature HTML possono essere migliorate e rendere questa tecnica davvero spettacolare. Si possono inserire titoli in animazione o sfondi grafici, oltre ad usare semplicemente Font non utilizzabili tramite CSS. Con le opportune modifiche si possono passare ulteriori parametri al nostro filmato Flash, rendendolo ancora più dinamico: dimensione del Font, posizione del testo, azioni da eseguire al click, etc... È inoltre possibile creare un set di filmati per le diverse tipologie di titoli da sostituire, garantendo comunque un notevole risparmio in termini di download-time!</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;bodytext=La%20tecnica%20di%20Text%20Replacement%20che%20presento%20oggi%20%C3%A8%2C%20per%20certi%20aspetti%2C%20davvero%20interessante.%20A%20differenza%20della%20classica%20sostituizione%20per%20immagine%20tramite%20CSS%2C%20questa%20tecnica%20usa%20un%20filmato%20Flash%20per%20sovrascrivere%20i%20titoli%20del%20nostro%20sito.%20Nonostan" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;notes=La%20tecnica%20di%20Text%20Replacement%20che%20presento%20oggi%20%C3%A8%2C%20per%20certi%20aspetti%2C%20davvero%20interessante.%20A%20differenza%20della%20classica%20sostituizione%20per%20immagine%20tramite%20CSS%2C%20questa%20tecnica%20usa%20un%20filmato%20Flash%20per%20sovrascrivere%20i%20titoli%20del%20nostro%20sito.%20Nonostan" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;t=Tecniche%20di%20Text%20Replacement%20in%20Flash" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;annotation=La%20tecnica%20di%20Text%20Replacement%20che%20presento%20oggi%20%C3%A8%2C%20per%20certi%20aspetti%2C%20davvero%20interessante.%20A%20differenza%20della%20classica%20sostituizione%20per%20immagine%20tramite%20CSS%2C%20questa%20tecnica%20usa%20un%20filmato%20Flash%20per%20sovrascrivere%20i%20titoli%20del%20nostro%20sito.%20Nonostan" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Tecniche%20di%20Text%20Replacement%20in%20Flash%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;headline=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=La%20tecnica%20di%20Text%20Replacement%20che%20presento%20oggi%20%C3%A8%2C%20per%20certi%20aspetti%2C%20davvero%20interessante.%20A%20differenza%20della%20classica%20sostituizione%20per%20immagine%20tramite%20CSS%2C%20questa%20tecnica%20usa%20un%20filmato%20Flash%20per%20sovrascrivere%20i%20titoli%20del%20nostro%20sito.%20Nonostan" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;t=Tecniche%20di%20Text%20Replacement%20in%20Flash" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Tecniche%20di%20Text%20Replacement%20in%20Flash&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F&amp;title=Tecniche%20di%20Text%20Replacement%20in%20Flash" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F25%2Ftecniche-di-text-replacement-in-flash%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/category/sviluppo/internet/ajax/" title="Ajax" rel="tag">Ajax</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/google-ajax-api/" title="Google AJAX API" rel="tag">Google AJAX API</a>, <a href="http://www.undolog.com/category/grafica-design/" title="Grafica &amp; Design" rel="tag">Grafica &amp; Design</a>, <a href="http://www.undolog.com/tag/html/" title="HTML" rel="tag">HTML</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/progressive-enhancement/" title="Progressive-Enhancement" rel="tag">Progressive-Enhancement</a>, <a href="http://www.undolog.com/tag/prototypejs/" title="Prototype.js" rel="tag">Prototype.js</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/swfobject/" title="SWFObject" rel="tag">SWFObject</a>, <a href="http://www.undolog.com/category/tecnologia/" title="Tecnologia" rel="tag">Tecnologia</a>, <a href="http://www.undolog.com/tag/text-replacement/" title="Text Replacement" rel="tag">Text Replacement</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a>, <a href="http://www.undolog.com/tag/tutorials/" title="Tutorials" rel="tag">Tutorials</a>, <a href="http://www.undolog.com/tag/unobtrusive/" title="Unobtrusive" rel="tag">Unobtrusive</a>, <a href="http://www.undolog.com/tag/unobtrusive-javascript/" title="Unobtrusive-JavaScript" rel="tag">Unobtrusive-JavaScript</a>, <a href="http://www.undolog.com/tag/xhtml/" title="XHTML" rel="tag">XHTML</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/04/10/unobtrusive-flash-objects/" title="Unobtrusive Flash Objects (10 aprile, 2007)">Unobtrusive Flash Objects</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/06/23/tecniche-di-text-replacement-in-htmlcss/" title="Tecniche di Text Replacement in HTML/CSS (23 giugno, 2008)">Tecniche di Text Replacement in HTML/CSS</a> (4)</li>
	<li><a href="http://www.undolog.com/2009/04/10/shadowbox-30-beta/" title="Shadowbox 3.0 beta (10 aprile, 2009)">Shadowbox 3.0 beta</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/03/25/unobtrusive-swfobject-20/" title="Unobtrusive SWFObject 2.0 (25 marzo, 2008)">Unobtrusive SWFObject 2.0</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/08/14/unobtrusive-simple-tabstrip/" title="Unobtrusive Simple TabStrip (14 agosto, 2008)">Unobtrusive Simple TabStrip</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/06/25/tecniche-di-text-replacement-in-flash/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flash e Papervision3D in Javascript</title>
		<link>http://www.undolog.com/2008/06/11/flash-e-papervision3d-in-javascript/</link>
		<comments>http://www.undolog.com/2008/06/11/flash-e-papervision3d-in-javascript/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 22:25:54 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Papervsion3D]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[AS3Wrapper]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=429</guid>
		<description><![CDATA[Edward Smith ha sviluppato un wrapper in grado di sfruttare le API Flash e Papervision3D in Javascript! La libreria, AS3Wrapper, è compatibile con FireFox e con IE. Con Safari per Windows funziona mentre ho riscontrato problemi con Opera 9, sempre per Windows. Il meccanismo che sta alla base di questo progetto, e che rende possibile [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Edward Smith</strong> ha sviluppato un <em>wrapper</em> in grado di sfruttare le <a title="API Flash" href="http://livedocs.adobe.com/flex/201/langref/index.html" target="_blank">API Flash</a> e <a title="Papervision3D" href="http://www.papervision3d.org/" target="_blank">Papervision3D</a> in Javascript! La libreria, <a title="AS3Wrapper" href="http://www.effectgenerator.com/AS3Wrapper/" target="_blank">AS3Wrapper</a>, è compatibile con <a title="FireFox" href="http://getfirefox.com/" target="_blank">FireFox</a> e con IE. Con Safari per Windows funziona mentre ho riscontrato problemi con Opera 9, sempre per Windows. Il meccanismo che sta alla base di questo progetto, e che rende possibile questa “magia”, è quello di includere nella nostra pagina HTML un contenitore Flash (AS3Wrapper.swf) che accetta comandi Javascript (AS3Wrapper.js), permettendo in pratica di costruire oggetti Flash direttamente da Javascript.</p>
<p><span id="more-429"></span></p>
<p>Il sistema, infatti, sfrutta la capacità di Javascript di comunicare con un filmati Flash presente nella pagina.<br />Il vantaggio, nell’uso di questa tecnica, potrebbe risiedere nella possibilità di creare dinamicamente del codice Javscript e quindi avere oggetti Flash anch’essi dinamici o, se preferite, generare contenuto Flash dinamicamente da Javascript. Sul sito Web dell’autore è possibile accedere alla documentazione di <a title="AS3Wrapper" href="http://www.effectgenerator.com/AS3Wrapper/" target="_blank">AS3Wrapper</a> insieme ad una serie di demo online, come quello di un <a title="Esempio AS3Wrapper" href="http://effectgenerator.com/AS3Wrapper/example-papervision1.html" target="_blank">cubo Papervision3D</a>.</p>
<p>Per avere un'idea di quanto sia semplice scrivere codice Actionscript in Javascript, ecco un esempio:</p>
<div class="igBar"><span id="lactionscript3-65"><a href="#" onclick="javascript:showCodeTxt('actionscript3-65'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-65">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.*;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.*;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">...</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> image<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=loader%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:loader.html"><span style="color: #004993;">Loader</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=loader%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:loader.html"><span style="color: #004993;">Loader</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; image<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=urlrequest%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:urlrequest.html"><span style="color: #004993;">URLRequest</span></a><span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>image<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In Javascrip avremo:</p>
<div class="igBar"><span id="ljavascript-66"><a href="#" onclick="javascript:showCodeTxt('javascript-66'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-66">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">with</span><span style="color: #009900;">&#40;</span>playerInstance<span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">with</span><span style="color: #009900;">&#40;</span>flash.<span style="color: #660066;">display</span><span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">with</span><span style="color: #009900;">&#40;</span>flash.<span style="color: #660066;">net</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> &nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> image <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Loader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; image.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> URLRequest<span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; addChild<span style="color: #009900;">&#40;</span>image<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript&amp;bodytext=Edward%20Smith%20ha%20sviluppato%20un%20wrapper%20in%20grado%20di%20sfruttare%20le%20API%20Flash%20e%20Papervision3D%20in%20Javascript%21%20La%20libreria%2C%20AS3Wrapper%2C%20%C3%A8%20compatibile%20con%20FireFox%20e%20con%20IE.%20Con%20Safari%20per%20Windows%20funziona%20mentre%20ho%20riscontrato%20problemi%20con%20Opera%209%2C%20sempre%20p" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript&amp;notes=Edward%20Smith%20ha%20sviluppato%20un%20wrapper%20in%20grado%20di%20sfruttare%20le%20API%20Flash%20e%20Papervision3D%20in%20Javascript%21%20La%20libreria%2C%20AS3Wrapper%2C%20%C3%A8%20compatibile%20con%20FireFox%20e%20con%20IE.%20Con%20Safari%20per%20Windows%20funziona%20mentre%20ho%20riscontrato%20problemi%20con%20Opera%209%2C%20sempre%20p" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;t=Flash%20e%20Papervision3D%20in%20Javascript" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript&amp;annotation=Edward%20Smith%20ha%20sviluppato%20un%20wrapper%20in%20grado%20di%20sfruttare%20le%20API%20Flash%20e%20Papervision3D%20in%20Javascript%21%20La%20libreria%2C%20AS3Wrapper%2C%20%C3%A8%20compatibile%20con%20FireFox%20e%20con%20IE.%20Con%20Safari%20per%20Windows%20funziona%20mentre%20ho%20riscontrato%20problemi%20con%20Opera%209%2C%20sempre%20p" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Flash%20e%20Papervision3D%20in%20Javascript%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Flash%20e%20Papervision3D%20in%20Javascript&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Flash%20e%20Papervision3D%20in%20Javascript&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Flash%20e%20Papervision3D%20in%20Javascript&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;headline=Flash%20e%20Papervision3D%20in%20Javascript&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Edward%20Smith%20ha%20sviluppato%20un%20wrapper%20in%20grado%20di%20sfruttare%20le%20API%20Flash%20e%20Papervision3D%20in%20Javascript%21%20La%20libreria%2C%20AS3Wrapper%2C%20%C3%A8%20compatibile%20con%20FireFox%20e%20con%20IE.%20Con%20Safari%20per%20Windows%20funziona%20mentre%20ho%20riscontrato%20problemi%20con%20Opera%209%2C%20sempre%20p" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;t=Flash%20e%20Papervision3D%20in%20Javascript" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Flash%20e%20Papervision3D%20in%20Javascript&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F&amp;title=Flash%20e%20Papervision3D%20in%20Javascript" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F11%2Fflash-e-papervision3d-in-javascript%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/3d/" title="3D" rel="tag">3D</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/3d-flash-cs3-sviluppo/" title="3D" rel="tag">3D</a>, <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/as3wrapper/" title="AS3Wrapper" rel="tag">AS3Wrapper</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/papervision3d/" title="Papervision3D" rel="tag">Papervision3D</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/3d-flash-cs3-sviluppo/papervsion3d/" title="Papervsion3D" rel="tag">Papervsion3D</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tecnologia/" title="Tecnologia" rel="tag">Tecnologia</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/04/28/piclens-in-flash-con-papervision3d-20/" title="Piclens in Flash con Papervision3D 2.0 (28 aprile, 2008)">Piclens in Flash con Papervision3D 2.0</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/02/29/umap-flash-component-beta-v06/" title="UMap Flash Component (Beta v0.6) (29 febbraio, 2008)">UMap Flash Component (Beta v0.6)</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/03/18/rinascono-gli-elementi-di-undologcom/" title="Rinascono gli elementi di undolog.com (18 marzo, 2008)">Rinascono gli elementi di undolog.com</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/06/17/piclens-in-flash-con-papervision3d-20-parte-ii/" title="PicLens in Flash con Papervision3D 2.0: parte II (17 giugno, 2008)">PicLens in Flash con Papervision3D 2.0: parte II</a> (14)</li>
	<li><a href="http://www.undolog.com/2008/05/30/papervision3d-basicview/" title="Papervision3D: BasicView (30 maggio, 2008)">Papervision3D: BasicView</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/06/11/flash-e-papervision3d-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Very short snippet: cutString()</title>
		<link>http://www.undolog.com/2008/06/04/very-short-snippet-cutstring/</link>
		<comments>http://www.undolog.com/2008/06/04/very-short-snippet-cutstring/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 16:30:59 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=419</guid>
		<description><![CDATA[Utile e rapido! Con i valori Number di Actionscript, ad esempio, è un essenziale aiuto per il "print" a video.
PLAIN TEXT
Actionscript:




/*


** @name &#160; &#160; &#160; &#160;: cutString()


** @description : cut a string for n chars


*/


protected function cutString&#40;s:String, v:uint = 4&#41;:String &#123;


&#160; &#160; return &#40; &#40;s.length&#62; v&#41;?s.substr&#40;0,v&#41;:s &#41;;


&#125;






Spesso lo uso anche in versione sub() o _s()




	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	



	Tags: [...]]]></description>
			<content:encoded><![CDATA[<p>Utile e rapido! Con i valori <code>Number</code> di Actionscript, ad esempio, è un essenziale aiuto per il "print" a video.</p>
<div class="igBar"><span id="lactionscript3-68"><a href="#" onclick="javascript:showCodeTxt('actionscript3-68'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-68">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @name &nbsp; &nbsp; &nbsp; &nbsp;: cutString()</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @description : cut a string for n chars</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> cutString<span style="color: #000000;">&#40;</span>s<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">,</span> v<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=uint%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:uint.html"><span style="color: #004993;">uint</span></a> = 4<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>s<span style="color: #000066; font-weight: bold;">.</span>length<span style="color: #000066; font-weight: bold;">&gt;</span> v<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">?</span>s<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">substr</span><span style="color: #000000;">&#40;</span>0<span style="color: #000066; font-weight: bold;">,</span>v<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>s <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Spesso lo uso anche in versione <code>sub()</code> o <code>_s()</code></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29&amp;bodytext=Utile%20e%20rapido%21%20Con%20i%20valori%20Number%20di%20Actionscript%2C%20ad%20esempio%2C%20%C3%A8%20un%20essenziale%20aiuto%20per%20il%20%22print%22%20a%20video.%0D%0A%5Bas%5D%0D%0A%2F%2A%0D%0A%2A%2A%20%40name%20%20%20%20%20%20%20%20%3A%20cutString%28%29%0D%0A%2A%2A%20%40description%20%3A%20cut%20a%20string%20for%20n%20chars%0D%0A%2A%2F%0D%0Aprotected%20function%20cutString%28s%3AString%2C%20v%3Auint%20%3D%20" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29&amp;notes=Utile%20e%20rapido%21%20Con%20i%20valori%20Number%20di%20Actionscript%2C%20ad%20esempio%2C%20%C3%A8%20un%20essenziale%20aiuto%20per%20il%20%22print%22%20a%20video.%0D%0A%5Bas%5D%0D%0A%2F%2A%0D%0A%2A%2A%20%40name%20%20%20%20%20%20%20%20%3A%20cutString%28%29%0D%0A%2A%2A%20%40description%20%3A%20cut%20a%20string%20for%20n%20chars%0D%0A%2A%2F%0D%0Aprotected%20function%20cutString%28s%3AString%2C%20v%3Auint%20%3D%20" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;t=Very%20short%20snippet%3A%20cutString%28%29" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29&amp;annotation=Utile%20e%20rapido%21%20Con%20i%20valori%20Number%20di%20Actionscript%2C%20ad%20esempio%2C%20%C3%A8%20un%20essenziale%20aiuto%20per%20il%20%22print%22%20a%20video.%0D%0A%5Bas%5D%0D%0A%2F%2A%0D%0A%2A%2A%20%40name%20%20%20%20%20%20%20%20%3A%20cutString%28%29%0D%0A%2A%2A%20%40description%20%3A%20cut%20a%20string%20for%20n%20chars%0D%0A%2A%2F%0D%0Aprotected%20function%20cutString%28s%3AString%2C%20v%3Auint%20%3D%20" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Very%20short%20snippet%3A%20cutString%28%29%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Very%20short%20snippet%3A%20cutString%28%29&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Very%20short%20snippet%3A%20cutString%28%29&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Very%20short%20snippet%3A%20cutString%28%29&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;headline=Very%20short%20snippet%3A%20cutString%28%29&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Utile%20e%20rapido%21%20Con%20i%20valori%20Number%20di%20Actionscript%2C%20ad%20esempio%2C%20%C3%A8%20un%20essenziale%20aiuto%20per%20il%20%22print%22%20a%20video.%0D%0A%5Bas%5D%0D%0A%2F%2A%0D%0A%2A%2A%20%40name%20%20%20%20%20%20%20%20%3A%20cutString%28%29%0D%0A%2A%2A%20%40description%20%3A%20cut%20a%20string%20for%20n%20chars%0D%0A%2A%2F%0D%0Aprotected%20function%20cutString%28s%3AString%2C%20v%3Auint%20%3D%20" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;t=Very%20short%20snippet%3A%20cutString%28%29" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Very%20short%20snippet%3A%20cutString%28%29&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F&amp;title=Very%20short%20snippet%3A%20cutString%28%29" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fvery-short-snippet-cutstring%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/02/01/yahoo-astra-suite-di-componenti-per-flash-e-flex/" title="Yahoo! ASTRA: suite di componenti per Flash e Flex (1 febbraio, 2008)">Yahoo! ASTRA: suite di componenti per Flash e Flex</a> (0)</li>
	<li><a href="http://www.undolog.com/2007/03/12/web20-gran-paradiso-firefox-30-e-apollo/" title="Web2.0: Gran Paradiso-Firefox 3.0 e Apollo (12 marzo, 2007)">Web2.0: Gran Paradiso-Firefox 3.0 e Apollo</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/02/13/web20-adobe-ci-prova-con-apollo/" title="Web2.0: Adobe ci prova con Apollo? (13 febbraio, 2007)">Web2.0: Adobe ci prova con Apollo?</a> (2)</li>
	<li><a href="http://www.undolog.com/2007/04/10/unobtrusive-flash-objects/" title="Unobtrusive Flash Objects (10 aprile, 2007)">Unobtrusive Flash Objects</a> (1)</li>
	<li><a href="http://www.undolog.com/2008/10/13/una-classe-countdown-in-javascript/" title="Una classe countDown in Javascript (13 ottobre, 2008)">Una classe countDown in Javascript</a> (5)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/06/04/very-short-snippet-cutstring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash CS3: creare un effetto Reflex su qualsiasi MovieClip</title>
		<link>http://www.undolog.com/2008/06/04/flash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip/</link>
		<comments>http://www.undolog.com/2008/06/04/flash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 01:00:58 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[beginGradientFill()]]></category>
		<category><![CDATA[Bitmap]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[cacheAsBitmap]]></category>
		<category><![CDATA[createGradientBox()]]></category>
		<category><![CDATA[Matrix]]></category>
		<category><![CDATA[reflex]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=421</guid>
		<description><![CDATA[Sfruttando una notevole caratteristica di Actionscript 3.0 (vedi Actionscript 3.0: tutto con l'operatore new) ho creato una classe ReflexMe in grado di generare un effetto "riflessione" su un qualsiasi MovieClip presente in libreria.













Il sorgente fa parte del pacchetto undolibrary - presente su GoogleCode - ma se volete potete scaricare il singolo file ReflexMe.as.

Utilizzo
Scaricate il file [...]]]></description>
			<content:encoded><![CDATA[<p>Sfruttando una notevole caratteristica di Actionscript 3.0 (vedi <a title="Actionscript 3.0: tutto con l'operatore new" href="http://www.undolog.com/2008/01/31/actionscript-30-tutto-con-loperatore-new/trackback/"><em>Actionscript 3.0: tutto con l'operatore new</em></a>) ho creato una classe <strong>ReflexMe</strong> in grado di generare un effetto "riflessione" su un qualsiasi MovieClip presente in libreria.</p>
<div style="border:1px solid #666;width:640px;margin:0 auto 12px">

<object width="640" height="480">
<param name="movie" value="/wp-content/uploads/2008/06/reflex.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#000000"></param>
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="640" height="480" src="/wp-content/uploads/2008/06/reflex.swf" quality="high" bgcolor="#000000" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>

</div>
<p>Il sorgente fa parte del pacchetto <a title="undolibrary" href="http://code.google.com/p/undolibrary/" target="_blank">undolibrary</a> - presente su GoogleCode - ma se volete potete scaricare il singolo file <a title="ReflexMe.as" href="http://undolibrary.googlecode.com/svn/trunk/as3/undolibrary/sfx/ReflexMe.as" target="_blank">ReflexMe.as</a>.</p>
<p><span id="more-421"></span><br />
<h4>Utilizzo</h4>
<p>Scaricate il file <a title="ReflexMe.as" href="http://undolibrary.googlecode.com/svn/trunk/as3/undolibrary/sfx/ReflexMe.as" target="_blank">ReflexMe.as</a> e posizionatelo nella cartella del vostro filmato .fla. Selezionate nella libreria il MovieClip a cui volete applicare <strong>l'effetto reflex</strong> e aprite la finestra delle <strong>proprietà simbolo</strong>. Nella sezione <strong>Concatenamento</strong> inserite <strong>ReflexMe</strong> nel campo <strong>Classe base</strong>:</p>
<p class="center"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="Propriet&#224; MovieClip" src="http://www.undolog.com/wp-content/uploads/2008/06/image1.png" width="401" border="0" /></p>
<p>A questo punto, provando il filmato, il MovieClip selezionato avrà l'effetto reflex. Se al MovieClip date un nome di istanza potrente anche regolare alcuni parametri come:</p>
<ul>
<li><strong>reflexOffset</strong> - distanza del riflesso</li>
<li><strong>gradientOffset</strong> - l'estenzione del gradiente riflesso</li>
<li><strong>alphaOffset</strong> - il canale alpha del riflesso </li>
<li><strong>gradientRadial</strong> - tipo di riflesso: radiale o lineare</li>
</ul>
<h4>Note</h4>
<p>La classe <a title="ReflexMe.as" href="http://undolibrary.googlecode.com/svn/trunk/as3/undolibrary/sfx/ReflexMe.as" target="_blank">ReflexMe.as</a> è scritta come<strong> classe base</strong> per estendere un qualsiasi MovieClip. La sua semplicità è tale e disarmante che potete riaddatarla anche come codice "spurio" da utilizzare da codice, invece che dall'IDE Flash. Tutto l'effetto è generato dalle poche (tolti i commenti) righe di codice che seguono:</p>
<div class="igBar"><span id="lactionscript3-70"><a href="#" onclick="javascript:showCodeTxt('actionscript3-70'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-70">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// preservo le dimesioni orginali del MovieClip</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__oWidth &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__oHeight &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// creo una BitmapData delle dimesioni del</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// MovieClip a cui voglio applicare l'effetto reflex</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmpd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0x000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// copio il MovieClip sulla BitmapData</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmpd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span> <span style="color: #0033ff; font-weight: bold;">this</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// creo un oggetto Bitmap per la visualizzazione</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// questo sarà il nostro effetto reflex</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000000;">&#40;</span> __bmpd <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// lo visualizzo</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> __bmp <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// lo ruoto di 180 gradi: lo inverto</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">scaleY</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;color:#800000;">1</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// lo posiziono alla base del MovieClip oroginale</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// il x 2 sull'altezza è necessario a casua della</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// rotazione che ha spostato l'origine degli assi</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = __oHeight<span style="color: #000066; font-weight: bold;">*</span>2 <span style="color: #000066; font-weight: bold;">+</span> __reflexOffset<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// cache come bitmap: necessario per mascherare dopo</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// con effetto gradiente e alpha channel</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cacheAsBitmap</span> &nbsp; &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// creo una maschera</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__mask &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=shape%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:shape.html"><span style="color: #004993;">Shape</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// cache come bitmap: necessario per mascherare dopo</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// con effetto gradiente e alpha channel</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cacheAsBitmap</span> &nbsp; &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// posiziono anch'essa sopra l'immagine riflessa</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= __oHeight <span style="color: #000066; font-weight: bold;">+</span> __reflexOffset<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// creo una matrice per il gradiente</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__matrix &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=matrix%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:matrix.html"><span style="color: #004993;">Matrix</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// creo il gradiente delle stesse dimensione del</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// MovieClip originale</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__matrix<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">createGradientBox</span><span style="color: #000000;">&#40;</span>__oWidth<span style="color: #000066; font-weight: bold;">,</span> __oHeight<span style="color: #000066; font-weight: bold;">,</span> <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span><span style="color: #000066; font-weight: bold;">/</span>2<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">with</span><span style="color: #000000;">&#40;</span> __mask<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">graphics</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">beginGradientFill</span><span style="color: #000000;">&#40;</span> <a href="http://www.google.com/search?q=gradienttype%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:gradienttype.html"><span style="color: #004993;">GradientType</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">LINEAR</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span>0x000000<span style="color: #000066; font-weight: bold;">,</span>0x000000<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span>__alphaOffset<span style="color: #000066; font-weight: bold;">,</span> 0<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span>0<span style="color: #000066; font-weight: bold;">,</span> __gradientOffset<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> __matrix<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span>0<span style="color: #000066; font-weight: bold;">,</span> 0<span style="color: #000066; font-weight: bold;">,</span> __oWidth<span style="color: #000066; font-weight: bold;">,</span> __oHeight<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> __mask <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900; font-style: italic;">// imposto maschera</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">__bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">mask</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= __mask<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;bodytext=Sfruttando%20una%20notevole%20caratteristica%20di%20Actionscript%203.0%20%28vedi%20Actionscript%203.0%3A%20tutto%20con%20l%27operatore%20new%29%20ho%20creato%20una%20classe%20ReflexMe%20in%20grado%20di%20generare%20un%20effetto%20%22riflessione%22%20su%20un%20qualsiasi%20MovieClip%20presente%20in%20libreria.%0D%0A%0D%0A%5Bswf%5D%2Fwp-cont" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;notes=Sfruttando%20una%20notevole%20caratteristica%20di%20Actionscript%203.0%20%28vedi%20Actionscript%203.0%3A%20tutto%20con%20l%27operatore%20new%29%20ho%20creato%20una%20classe%20ReflexMe%20in%20grado%20di%20generare%20un%20effetto%20%22riflessione%22%20su%20un%20qualsiasi%20MovieClip%20presente%20in%20libreria.%0D%0A%0D%0A%5Bswf%5D%2Fwp-cont" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;t=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;annotation=Sfruttando%20una%20notevole%20caratteristica%20di%20Actionscript%203.0%20%28vedi%20Actionscript%203.0%3A%20tutto%20con%20l%27operatore%20new%29%20ho%20creato%20una%20classe%20ReflexMe%20in%20grado%20di%20generare%20un%20effetto%20%22riflessione%22%20su%20un%20qualsiasi%20MovieClip%20presente%20in%20libreria.%0D%0A%0D%0A%5Bswf%5D%2Fwp-cont" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;headline=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Sfruttando%20una%20notevole%20caratteristica%20di%20Actionscript%203.0%20%28vedi%20Actionscript%203.0%3A%20tutto%20con%20l%27operatore%20new%29%20ho%20creato%20una%20classe%20ReflexMe%20in%20grado%20di%20generare%20un%20effetto%20%22riflessione%22%20su%20un%20qualsiasi%20MovieClip%20presente%20in%20libreria.%0D%0A%0D%0A%5Bswf%5D%2Fwp-cont" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;t=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F&amp;title=Flash%20CS3%3A%20creare%20un%20effetto%20Reflex%20su%20qualsiasi%20MovieClip" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F04%2Fflash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/begingradientfill/" title="beginGradientFill()" rel="tag">beginGradientFill()</a>, <a href="http://www.undolog.com/tag/bitmap/" title="Bitmap" rel="tag">Bitmap</a>, <a href="http://www.undolog.com/tag/bitmapdata/" title="BitmapData" rel="tag">BitmapData</a>, <a href="http://www.undolog.com/tag/cacheasbitmap/" title="cacheAsBitmap" rel="tag">cacheAsBitmap</a>, <a href="http://www.undolog.com/tag/creategradientbox/" title="createGradientBox()" rel="tag">createGradientBox()</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/tag/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/matrix/" title="Matrix" rel="tag">Matrix</a>, <a href="http://www.undolog.com/tag/reflex/" title="reflex" rel="tag">reflex</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a>, <a href="http://www.undolog.com/tag/tutorials/" title="Tutorials" rel="tag">Tutorials</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/09/15/undolibrary-matrixarray-unestensione-della-classe-array/" title="Undolibrary MatrixArray: un&#8217;estensione della classe Array (15 settembre, 2008)">Undolibrary MatrixArray: un&#8217;estensione della classe Array</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/02/11/painting-flash-cs3-real-time-erase-tool/" title="Painting Flash CS3: real time erase tool (11 febbraio, 2008)">Painting Flash CS3: real time erase tool</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/03/27/flash-cs3-creare-effetto-nebbia-tv-in-1-secondo/" title="Flash CS3: creare effetto nebbia TV in 1 secondo (27 marzo, 2008)">Flash CS3: creare effetto nebbia TV in 1 secondo</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/02/10/creare-unapplicazione-paint-in-flash-cs3/" title="Creare un&#8217;applicazione Paint in Flash CS3 (10 febbraio, 2008)">Creare un&#8217;applicazione Paint in Flash CS3</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/03/31/come-salvare-immagini-in-flash-cs3/" title="Come salvare immagini in Flash CS3 (31 marzo, 2008)">Come salvare immagini in Flash CS3</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/06/04/flash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Effetti sulle Bitmap con perlinNoise()</title>
		<link>http://www.undolog.com/2008/06/02/effetti-sulle-bitmap-con-perlinnoise/</link>
		<comments>http://www.undolog.com/2008/06/02/effetti-sulle-bitmap-con-perlinnoise/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 20:45:38 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Grafica & Design]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Bitmap]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[noise()]]></category>
		<category><![CDATA[perlinNoise]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=416</guid>
		<description><![CDATA[La classe BitmapData permette di applicare in modo semplice effetti utilissimi per svariati scopi. Avevamo già visto come creare un effetto "nebbia tv" con poche righe di codice (Flash CS3: creare effetto nebbia TV in 1 secondo). Ora ci occuperemo di un altro effetto "spettacolare" che, come vedremo in seguito, permette di realizzare degli interessantissimi [...]]]></description>
			<content:encoded><![CDATA[<p>La classe <code>BitmapData</code> permette di applicare in modo semplice effetti utilissimi per svariati scopi. Avevamo già visto come creare un effetto "nebbia tv" con poche righe di codice (<a href="http://www.undolog.com/2008/03/27/flash-cs3-creare-effetto-nebbia-tv-in-1-secondo/trackback/">Flash CS3: creare effetto nebbia TV in 1 secondo</a>). Ora ci occuperemo di un altro effetto "spettacolare" che, come vedremo in seguito, permette di realizzare degli interessantissimi effetti grafici, come nell'esempio mostrato qui sotto: variate i parametri per osservare i differenti effetti, cliccando con il mouse sull'immagine generata questa può essere spostata.</p>
<div style="border-right: #666 1px solid; border-top: #666 1px solid; margin: 0px auto 12px; border-left: #666 1px solid; width: 640px; border-bottom: #666 1px solid">
<object width="640" height="330">
<param name="movie" value="/wp-content/uploads/2008/06/mapeffect.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#000000"></param>
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="640" height="330" src="/wp-content/uploads/2008/06/mapeffect.swf" quality="high" bgcolor="#000000" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>
</div>
<p>Per l'occasione ho anche aggiunto un nuovo semplice componente (Check) in <a href="http://code.google.com/p/undolibrary/" target="_blank">Undolibrary</a>! Quindi aggiornate il vostro repository SVN. Il sorgente è disponibile qui: <a href="http://undolibrary.googlecode.com/files/mapeffect1.0.zip">MapEffect.zip</a> </p>
<p><span id="more-416"></span></p>
<p>L'effetto mostrato nel filmato di sopra viene interamente realizzato sfruttando il metodo <code>perlinNoise()</code> messo a disposizione dall'oggetto <code>BitmapData</code>. Come indicato nel manuale: </p>
<blockquote><p>L'algoritmo di generazione del disturbo Perlin interpola e combina singole funzioni di disturbo casuale (definite ottave) in un'unica funzione che genera un disturbo casuale dall'aspetto più naturale.</p>
</blockquote>
<p>E ancora:</p>
<blockquote><p>Le funzioni di disturbo Perlin possono essere utilizzate per simulare fenomeni naturali e paesaggi, come la <strong>trama del legno</strong>, le <strong>nuvole</strong> e le <strong>catene montuose</strong>.</p>
</blockquote>
<p>Potete utilizzare il filmato dimostrativo per vedere come cambia l'immagine generata in base ai suoi parametri principali. Nel filmato <strong>non ho permesso</strong> la modifica del parametro <code>randomSeed</code>, un numero utilizzato per la generazione del pattern randomico (questo per permettere uno scroll continuo dell'immagine - cliccate con il mouse sull'immagine e trascinatela).</p>
<h4>Sorgente</h4>
<p>La classe documento <code>MapEffect</code> contiene tutto il codice della dimostrazione, tuttavia il cuore dell'applicazione è racchiuso nel metodo <code>doPerlinNoise()</code>:</p>
<div class="igBar"><span id="lactionscript3-72"><a href="#" onclick="javascript:showCodeTxt('actionscript3-72'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-72">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: doPerlinNoise()</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">*/</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> doPerlinNoise<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> p<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a> &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=point%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:point.html"><span style="color: #004993;">Point</span></a><span style="color: #000000;">&#40;</span>__translateX<span style="color: #000066; font-weight: bold;">,</span> __translateY<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; __bmpd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">perlinNoise</span><span style="color: #000000;">&#40;</span>__mapWidth<span style="color: #000066; font-weight: bold;">,</span> __mapHeight<span style="color: #000066; font-weight: bold;">,</span> __octave<span style="color: #000066; font-weight: bold;">,</span> __seed<span style="color: #000066; font-weight: bold;">,</span> __transuni<span style="color: #000066; font-weight: bold;">,</span> __fractal<span style="color: #000066; font-weight: bold;">,</span> <a href="http://www.google.com/search?q=bitmapdatachannel%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdatachannel.html"><span style="color: #004993;">BitmapDataChannel</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">GREEN</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span>p<span style="color: #000066; font-weight: bold;">,</span>p<span style="color: #000066; font-weight: bold;">,</span>p<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><code>__bmpd</code> è un puntatore ad un oggetto <code>BitmapData</code>, che viene poi visualizzato tramite l'oggetto "grafico" <code>Bitmap</code> (<code>__bmp</code>). Tutti i parametri della chiamata a <code>perlinNoise()</code> sono parametrici, tranne - come accennato prima - <code>__seed</code> (questo può essere un valore a piacere).</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;bodytext=La%20classe%20BitmapData%20permette%20di%20applicare%20in%20modo%20semplice%20effetti%20utilissimi%20per%20svariati%20scopi.%20Avevamo%20gi%C3%A0%20visto%20come%20creare%20un%20effetto%20%22nebbia%20tv%22%20con%20poche%20righe%20di%20codice%20%28Flash%20CS3%3A%20creare%20effetto%20nebbia%20TV%20in%201%20secondo%29.%20Ora%20ci%20occuperemo%20d" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;notes=La%20classe%20BitmapData%20permette%20di%20applicare%20in%20modo%20semplice%20effetti%20utilissimi%20per%20svariati%20scopi.%20Avevamo%20gi%C3%A0%20visto%20come%20creare%20un%20effetto%20%22nebbia%20tv%22%20con%20poche%20righe%20di%20codice%20%28Flash%20CS3%3A%20creare%20effetto%20nebbia%20TV%20in%201%20secondo%29.%20Ora%20ci%20occuperemo%20d" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;t=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;annotation=La%20classe%20BitmapData%20permette%20di%20applicare%20in%20modo%20semplice%20effetti%20utilissimi%20per%20svariati%20scopi.%20Avevamo%20gi%C3%A0%20visto%20come%20creare%20un%20effetto%20%22nebbia%20tv%22%20con%20poche%20righe%20di%20codice%20%28Flash%20CS3%3A%20creare%20effetto%20nebbia%20TV%20in%201%20secondo%29.%20Ora%20ci%20occuperemo%20d" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;headline=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=La%20classe%20BitmapData%20permette%20di%20applicare%20in%20modo%20semplice%20effetti%20utilissimi%20per%20svariati%20scopi.%20Avevamo%20gi%C3%A0%20visto%20come%20creare%20un%20effetto%20%22nebbia%20tv%22%20con%20poche%20righe%20di%20codice%20%28Flash%20CS3%3A%20creare%20effetto%20nebbia%20TV%20in%201%20secondo%29.%20Ora%20ci%20occuperemo%20d" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;t=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F&amp;title=Effetti%20sulle%20Bitmap%20con%20perlinNoise%28%29" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F06%2F02%2Feffetti-sulle-bitmap-con-perlinnoise%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash-cs3/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/bitmap/" title="Bitmap" rel="tag">Bitmap</a>, <a href="http://www.undolog.com/tag/bitmapdata/" title="BitmapData" rel="tag">BitmapData</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/category/grafica-design/" title="Grafica &amp; Design" rel="tag">Grafica &amp; Design</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/noise/" title="noise()" rel="tag">noise()</a>, <a href="http://www.undolog.com/tag/perlinnoise/" title="perlinNoise" rel="tag">perlinNoise</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/06/04/flash-cs3-creare-un-effetto-reflex-su-qualsiasi-movieclip/" title="Flash CS3: creare un effetto Reflex su qualsiasi MovieClip (4 giugno, 2008)">Flash CS3: creare un effetto Reflex su qualsiasi MovieClip</a> (12)</li>
	<li><a href="http://www.undolog.com/2008/03/27/flash-cs3-creare-effetto-nebbia-tv-in-1-secondo/" title="Flash CS3: creare effetto nebbia TV in 1 secondo (27 marzo, 2008)">Flash CS3: creare effetto nebbia TV in 1 secondo</a> (4)</li>
	<li><a href="http://www.undolog.com/2008/02/11/painting-flash-cs3-real-time-erase-tool/" title="Painting Flash CS3: real time erase tool (11 febbraio, 2008)">Painting Flash CS3: real time erase tool</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/06/06/esperimenti-con-displacementmapfilter-e-perlinnoise/" title="Esperimenti con DisplacementMapFilter e perlinNoise() (6 giugno, 2008)">Esperimenti con DisplacementMapFilter e perlinNoise()</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/02/10/creare-unapplicazione-paint-in-flash-cs3/" title="Creare un&#8217;applicazione Paint in Flash CS3 (10 febbraio, 2008)">Creare un&#8217;applicazione Paint in Flash CS3</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/06/02/effetti-sulle-bitmap-con-perlinnoise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>L&#8217;operazione aritmetica modulo</title>
		<link>http://www.undolog.com/2008/05/31/loperazione-aritmetica-modulo/</link>
		<comments>http://www.undolog.com/2008/05/31/loperazione-aritmetica-modulo/#comments</comments>
		<pubDate>Sat, 31 May 2008 06:00:13 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[AND]]></category>
		<category><![CDATA[Aritmetica Orologio]]></category>
		<category><![CDATA[aritmetica-finita]]></category>
		<category><![CDATA[Binario]]></category>
		<category><![CDATA[Commodore-64]]></category>
		<category><![CDATA[modulo]]></category>
		<category><![CDATA[NOT]]></category>
		<category><![CDATA[operatore-ternario]]></category>
		<category><![CDATA[OR]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=415</guid>
		<description><![CDATA[Il "modulo" è una delle operazioni aritmentiche disponibili su praticamente tutti i linguaggi di programmazione (l'ho usato la prima volta con il Basic del Commodore 64). Può comparire come semplice operatore, come nel caso di Actionscript o Javascript che usano entrambi il carattere "percento" (a % b), o come metodo o istruzione. Per gli sviluppatori [...]]]></description>
			<content:encoded><![CDATA[<p>Il "modulo" è una delle operazioni aritmentiche disponibili su praticamente tutti i linguaggi di programmazione <del datetime="2008-05-31T12:00:33+00:00">(l'ho usato la prima volta con il Basic del Commodore 64)</del>. Può comparire come semplice operatore, come nel caso di Actionscript o Javascript che usano entrambi il carattere "percento" (a % b), o come metodo o istruzione. Per gli sviluppatori può risultare utile in contesti apparentemente diversi tra loro. <a href="http://www.gskinner.com/blog/archives/2008/05/core_as3_modulu.html" target="_blank">Gskinner</a> ne ha parlato poco tempo fa, mostrando alcuni classici, ma interessanti, esempi.</p>
<p>Semplificando, l'operazione modulo tra due numeri restituisce il resto della loro divisione. Per completezza diciamo che l'operazione di modulo è un argomento assai vasto, che ho trattato anche in <em><a href="http://www.undolog.com/2007/01/30/la-cifratura-rsa/trackback/">La cifratura RSA</a></em>! Questa volta, tuttavia, non parleremo di codici o cifrature, ma di cose utili e molto più semplici.</p>
<h4>Divisibile per... <em>alternare</em></h4>
<p>Il primo uso che possiamo fare dell'operazione di modulo è quella di determinare se un numero <em>a</em> è divisibile per un numero <em>b</em>! Se il risultatto di <em>a</em> % <em>b</em>(userò qui la notazione % per indicare l'operazione di modulo) è zero, <em>a</em> è divisibile per <em>b</em>. Ricordo che quando ebbi a che fare con un problema simile non conoscevo l'operazione di modulo. Sul Commodore 64 mi serviva sapere se un numero era divisibile per 2. All'epoca usai questa sintassi (ho ritrovato il codice origionale - anno 1983):</p>
<div class="igBar"><span id="lcode-85"><a href="#" onclick="javascript:showCodeTxt('code-85'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-85">
<div class="code" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">10</span> INPUT A</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">12</span> B=A/<span style="color:#800000;color:#800000;">2</span>: IF B = INT<span style="color:#006600; font-weight:bold;">&#40;</span>B<span style="color:#006600; font-weight:bold;">&#41;</span> THEN PRINT <span style="color:#CC0000;">&quot;OK IL NUMERO &quot;</span>A<span style="color:#CC0000;">&quot; E' PARI&quot;</span>:GOTO <span style="color:#800000;color:#800000;">10</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">14</span> PRINT <span style="color:#CC0000;">&quot;IL NUMERO &quot;</span>A<span style="color:#CC0000;">&quot; E' DISPARI&quot;</span>:GOTO <span style="color:#800000;color:#800000;">10</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Il BASIC del Commodore 64, comunque, non possedeva l'operazione di modulo -  almeno che io ricordi!!</p>
<p><span id="more-415"></span></p>
<p>In pratica facevo esattamente quello che per sua natura fa l'operazione di modulo: verificavo che la divisione per 2 non avesse resto, in questo caso verificavo che il risultato non contenesse decimali ( <code>IF B = INT(B)</code> )! Se l'operazione di divisione è uguale al suo intero, allora il numero è pari!</p>
<p>Se in <code>a</code> abbiamo il nostro valore da controllare, la stessa cosa può essere risolta da:</p>
<div class="igBar"><span id="lactionscript3-86"><a href="#" onclick="javascript:showCodeTxt('actionscript3-86'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-86">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>a <span style="color: #000066; font-weight: bold;">%</span> <span style="color: #000000; font-weight:bold;color:#800000;">2</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000; font-weight:bold;color:#800000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// pari</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Oppure, per il 3, da:</p>
<div class="igBar"><span id="lactionscript3-87"><a href="#" onclick="javascript:showCodeTxt('actionscript3-87'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-87">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#40;</span>a <span style="color: #000066; font-weight: bold;">%</span> <span style="color: #000000; font-weight:bold;color:#800000;">3</span><span style="color: #000000;">&#41;</span> == <span style="color: #000000; font-weight:bold;color:#800000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// divisibile per 3</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Piccola nota: grazie al binario se si ha a che fare con le potenze di 2 c'è annche un modo più rapido di verificare se un numero è pari o dispari. In notazione binaria, infatti, i numeri pari hanno tutti il primo bit a zero! Così, utilizzando gli operatori logici, è possibile sapere se un numero e pari o dispari semplicemente "testanto" il primo bit:</p>
<div class="igBar"><span id="lactionscript3-88"><a href="#" onclick="javascript:showCodeTxt('actionscript3-88'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-88">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #000066; font-weight: bold;">!</span><span style="color: #000000;">&#40;</span>a <span style="color: #000066; font-weight: bold;">&amp;</span> <span style="color: #000000; font-weight:bold;color:#800000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// pari</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In Assembly, ad esempio, questo è pane quotidiano! Ed è ancora più immediato e semplice (il Motorola 68020, ad esempio, aveva un'istruzione <code>BTST</code> che "testata" proprio un singolo bit <img src='http://www.undolog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). Le operazioni logiche (AND, OR, NOT, XOR, etc...), infatti, sono notoriamente più veloci a livello di eseguzione e quindi di "tempo macchina"! <code>(a &#038; 1)</code> esegue l'operazione logica di AND (<code>&#038;</code> - moltiplicazione bit a bit) tra il nostro valore <code>a</code> e 1 (chiamato <strong>maschera</strong>). Se <code>a</code> = 7 (00000111), ad esempio:</p>
<div class="igBar"><span id="lcode-89"><a href="#" onclick="javascript:showCodeTxt('code-89'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-89">
<div class="code" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">00000111 AND</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">00000001 =</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">00000001 ; dispari</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Se <code>a</code> = 8:</p>
<div class="igBar"><span id="lcode-90"><a href="#" onclick="javascript:showCodeTxt('code-90'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-90">
<div class="code" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">00001000 AND</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">00000001 =</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">00000000 ; pari</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Non solo possiamo verificare i numeri pari, cioè con il primo bit a 0, e quindi divisibili per 2, ma possiamo anche verificare se un numero è divisibile per 4, 8, 16, 32, 64, etc... utilizzando le opportune <strong>maschere</strong>:</p>
<div class="igBar"><span id="lactionscript3-91"><a href="#" onclick="javascript:showCodeTxt('actionscript3-91'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-91">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span> <span style="color: #000066; font-weight: bold;">!</span><span style="color: #000000;">&#40;</span>a <span style="color: #000066; font-weight: bold;">&amp;</span> <span style="color: #000000; font-weight:bold;color:#800000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// divisibile per 4 (maschera = 3 = 00000011) dato che 4 è 00000100)</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Se gli ultimi due bit sono a zero il numero è divisibile per 4! Se gli ultimi 3 bit (maschera 00000111) sono a zero il numero è divisibile per 8! E così via <img src='http://www.undolog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.gskinner.com/blog/archives/2008/05/core_as3_modulu.html" target="_blank">Gskinner</a> mostra l'uso del modulo nei casi di generazione di valori alternati. Classico esempio è quello di modificare lo sfondo di una lista di elementi: una riga bianca e una grigia. <a href="http://www.gskinner.com/blog/archives/2008/05/core_as3_modulu.html" target="_blank">Gskinner</a> propone:</p>
<div class="igBar"><span id="lactionscript3-92"><a href="#" onclick="javascript:showCodeTxt('actionscript3-92'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-92">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>rowIndex <span style="color: #000066; font-weight: bold;">%</span> 2 == 0<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;rowColor = 0xFFFFFF<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;rowColor = 0xCCCCCC<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Prima di tutto il codice sopra può essere risolto con una sola riga di codice:</p>
<div class="igBar"><span id="lactionscript3-93"><a href="#" onclick="javascript:showCodeTxt('actionscript3-93'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-93">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rowColor = <span style="color: #000000;">&#40;</span>rowIndex <span style="color: #000066; font-weight: bold;">%</span> 2 == 0<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">?</span>0xFFFFFF<span style="color: #000066; font-weight: bold;">:</span>0xCCCCCC<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Inoltre, in questo specifico caso, eviterei effettivamente di eseguire una "pesante" operazione di modulo. Questa situazione particolare è spesso innestata in loop, e quindi sarebbe "bene" non sciupare cicli di clock macchina. In questi casi a me piace la più pulita (e logica) soluzione:</p>
<div class="igBar"><span id="lactionscript3-94"><a href="#" onclick="javascript:showCodeTxt('actionscript3-94'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-94">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rowColor = <span style="color: #000000;">&#40;</span>fooIndex = <span style="color: #000000;">&#40;</span>fooIndex == <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">?</span>0xFFFFFF<span style="color: #000066; font-weight: bold;">:</span>0xCCCCCC<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Dove è <code>fooIndex</code> è un valore impostato precedentemete a <code>true</code> o <code>false</code>, a seconda di come vogliamo impostare inizialmente il nostro colore sfondo. Questo approccio è più sottile e meno immediato, a prima vista, ma più rapido in quanto esegue operazioni logiche di true/false. Se <code>fooIndex</code> è true, quando viene eseguita l'istruzione <code>(fooIndex = (fooIndex == false) )</code> la condizione <code>(fooIndex == false)</code> sarà falsa e di conseguenza <code>fooIndex</code> verrà impostato da true a false. La seconda volta, tuttavia, la condizione <code>(fooIndex == false)</code> sarà vera e quindi <code>fooIndex</code> verrà impostato da false a true! E così via...</p>
<h4>Ripetizioni: il comportamento ad orologio</h4>
<p>L'aritmetica finita, che sta alla base del funzionamento dell'operazione di modulo, è spesso indicata come aritmetica dell'orologio. Un orologio classico a lancette ha un quadrante suddiviso in 12 ore (12 diurne più 12 notturne!), sufficienti ad indicare una delle qualsiasi 24 ore di una giornata. Se alle 08:00 del mattino vi chiedessi che ora segnerà il vostro orologio fra 18 ore, la vostra risposta non sarebbe 8+18 = 26! Bensì le 02:00 di notte! Involontariamente e senza forse saperlo, eseguiamo conitnuamente operazioni di modulo ogni qualvolta abbiamo a che fare con gli orari.</p>
<p>In Italia siamo abituati al sistema di 24 ore (o misto). Quando indichiamo le ore 16:00 intendiamo quell'orario che in altri paesi è indicato come 04:00 pm. Chi usa il postfisso am/pm per distinguere le ore diune da quelle notturne, esegue ancor più spesso l'operazione di modulo, in questo caso modulo 12! Noi italiani, ed altri, invece, essendo abituati a considerare le 24 ore, eseguiamo operazioni con modulo 24!</p>
<p>Quando sono le 11 del mattino (11:00 per tutti) e pensiamo a "fra 5 ore", noi italiani rispondiamo 5+11 = 16 (le quattro del pomeriggio), uno straniero potrebbe ugualmente rispondere 5+11 = 4 pm. Visto che 5 + 11, nell'aritmetica classica, fa evidentemente 16, come ha fatto lo straniero a rispondere 4 pm? Ha semplicemente eseguito il modulo 12 sul risultato: 5 + 11 = 16 mod 12 = 4. Non è necessario che prendiate una calcolatrice per verificare l'esattezza del computo, ma procedete come fanno un po' tutti; visualizzate un quadrante di un'orologio e posizionate mentalmente le lancette sulle 11, aggiungete poi - sempre visivamente - 5 ore e, come per magia vi ritroverete effettivamente sulle 4! Ecco perchè le quattro del pomeriggio vengono chiamate 16 <img src='http://www.undolog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In Italia, invece, usiamo un modulo 24, infatti: 11+5 = 16 mod 24 = 16. Quando sono le 23:00 di sera, dopo 5 ore non saranno le 28:00, perchè 28 modulo 12 = 4! 122514884225 modulo 24 = 17! Quello che accade è che la cifra del risultato modulo 24 non supera mai 24. Ma la cosa più interessante è che i numeri si ripetono indefinitivamente:</p>
<div class="igBar"><span id="lcode-95"><a href="#" onclick="javascript:showCodeTxt('code-95'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-95">
<div class="code" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">1</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">2</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">2</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">3</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">3</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">...</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">22</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">22</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">23</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">23</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">24</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">25</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">26</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">2</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">27</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">3</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">...</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">48</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">0</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">49</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">50</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">2</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color:#800000;color:#800000;">51</span> % <span style="color:#800000;color:#800000;">24</span> = <span style="color:#800000;color:#800000;">3</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">...</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Questa ripetizione è di una comodità disarmante. Immaginiamo, ad esempio, di dover disporre un oggetto, un MovieClip, similmente ad una scacchiera, su quattro colonne. Creiamo un MovieClip quandrato, 55x55 pixel e dal pannello delle proprietà esportiamolo con il nome <code>Simbolo</code>. Il codice seguente disporrà il nostro MovieClip su quattro colonne e andrà "a capo" grazie all'operazione di modulo:</p>
<div class="igBar"><span id="lactionscript3-96"><a href="#" onclick="javascript:showCodeTxt('actionscript3-96'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-96">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> col<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html"><span style="color: #004993;">Number</span></a> = <span style="color: #000000; font-weight:bold;color:#800000;">4</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i=<span style="color: #000000; font-weight:bold;color:#800000;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;color:#800000;">12</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> s<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a> &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">new</span> Simbolo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> s <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; s<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #000000;">&#40;</span>i <span style="color: #000066; font-weight: bold;">%</span> col<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;color:#800000;">60</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; s<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html"><span style="color: #004993;">Math</span></a><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#40;</span>i<span style="color: #000066; font-weight: bold;">/</span>col<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;color:#800000;">60</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Come si vede dal codice, la variabile <code>i</code> del ciclo <code>for</code> cresce in modo indefinito. Ma la coordinata <code>x</code> del nostro MovieClip non supera mai un certo valore, e si ripete indefinitivamente! Ecco un esempio concreto:</p>
<div style="border:1px solid #666;width:500px;margin:0 auto">

<object width="500" height="300">
<param name="movie" value="/wp-content/uploads/2008/05/testmodulo.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#000000"></param>
<param name="allowFullScreen" value="true"></param>
<embed type="application/x-shockwave-flash" width="500" height="300" src="/wp-content/uploads/2008/05/testmodulo.swf" quality="high" bgcolor="#000000" wmode="window" menu="false" allowFullScreen="true" ></embed>
</object>

</div>
<p>Tramite le due manopole potete variare il numero di colonne (il modulo) e il numero totale degli elementi, sfruttando l'algoritmo di sorpa.</p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo&amp;bodytext=Il%20%22modulo%22%20%C3%A8%20una%20delle%20operazioni%20aritmentiche%20disponibili%20su%20praticamente%20tutti%20i%20linguaggi%20di%20programmazione%20%28l%27ho%20usato%20la%20prima%20volta%20con%20il%20Basic%20del%20Commodore%2064%29.%20Pu%C3%B2%20comparire%20come%20semplice%20operatore%2C%20come%20nel%20caso%20di%20Actionscript%20o%20Javasc" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo&amp;notes=Il%20%22modulo%22%20%C3%A8%20una%20delle%20operazioni%20aritmentiche%20disponibili%20su%20praticamente%20tutti%20i%20linguaggi%20di%20programmazione%20%28l%27ho%20usato%20la%20prima%20volta%20con%20il%20Basic%20del%20Commodore%2064%29.%20Pu%C3%B2%20comparire%20come%20semplice%20operatore%2C%20come%20nel%20caso%20di%20Actionscript%20o%20Javasc" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;t=L%27operazione%20aritmetica%20modulo" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo&amp;annotation=Il%20%22modulo%22%20%C3%A8%20una%20delle%20operazioni%20aritmentiche%20disponibili%20su%20praticamente%20tutti%20i%20linguaggi%20di%20programmazione%20%28l%27ho%20usato%20la%20prima%20volta%20con%20il%20Basic%20del%20Commodore%2064%29.%20Pu%C3%B2%20comparire%20come%20semplice%20operatore%2C%20come%20nel%20caso%20di%20Actionscript%20o%20Javasc" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=L%27operazione%20aritmetica%20modulo%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=L%27operazione%20aritmetica%20modulo&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=L%27operazione%20aritmetica%20modulo&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=L%27operazione%20aritmetica%20modulo&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;headline=L%27operazione%20aritmetica%20modulo&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Il%20%22modulo%22%20%C3%A8%20una%20delle%20operazioni%20aritmentiche%20disponibili%20su%20praticamente%20tutti%20i%20linguaggi%20di%20programmazione%20%28l%27ho%20usato%20la%20prima%20volta%20con%20il%20Basic%20del%20Commodore%2064%29.%20Pu%C3%B2%20comparire%20come%20semplice%20operatore%2C%20come%20nel%20caso%20di%20Actionscript%20o%20Javasc" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;t=L%27operazione%20aritmetica%20modulo" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=L%27operazione%20aritmetica%20modulo&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F&amp;title=L%27operazione%20aritmetica%20modulo" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F31%2Floperazione-aritmetica-modulo%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/category/sviluppo/flash/actionscript/" title="ActionScript" rel="tag">ActionScript</a>, <a href="http://www.undolog.com/tag/and/" title="AND" rel="tag">AND</a>, <a href="http://www.undolog.com/tag/aritmetica-orologio/" title="Aritmetica Orologio" rel="tag">Aritmetica Orologio</a>, <a href="http://www.undolog.com/tag/aritmetica-finita/" title="aritmetica-finita" rel="tag">aritmetica-finita</a>, <a href="http://www.undolog.com/tag/binario/" title="Binario" rel="tag">Binario</a>, <a href="http://www.undolog.com/tag/commodore-64/" title="Commodore-64" rel="tag">Commodore-64</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/category/sviluppo/internet/javascript/" title="Javascript" rel="tag">Javascript</a>, <a href="http://www.undolog.com/tag/modulo/" title="modulo" rel="tag">modulo</a>, <a href="http://www.undolog.com/tag/not/" title="NOT" rel="tag">NOT</a>, <a href="http://www.undolog.com/tag/operatore-ternario/" title="operatore-ternario" rel="tag">operatore-ternario</a>, <a href="http://www.undolog.com/tag/or/" title="OR" rel="tag">OR</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2007/01/30/la-cifratura-rsa/" title="La cifratura RSA (30 gennaio, 2007)">La cifratura RSA</a> (6)</li>
	<li><a href="http://www.undolog.com/2009/01/23/undolog-postazioni-di-lavoro-tra-passato-e-presente/" title="Undolog: postazioni di lavoro tra passato e presente (23 gennaio, 2009)">Undolog: postazioni di lavoro tra passato e presente</a> (13)</li>
	<li><a href="http://www.undolog.com/2007/06/13/tips-tricks-generatore-01-con-loperatore-ternario/" title="Tips &amp; Tricks: generatore 0/1 con l&#8217;operatore ternario (13 giugno, 2007)">Tips &amp; Tricks: generatore 0/1 con l&#8217;operatore ternario</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/03/05/linguaggi-di-sviluppo/" title="Linguaggi di sviluppo (5 marzo, 2008)">Linguaggi di sviluppo</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/07/20/greetings-professor-falken/" title="Greetings Professor Falken (20 luglio, 2008)">Greetings Professor Falken</a> (7)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/05/31/loperazione-aritmetica-modulo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Papervision3D: BasicView</title>
		<link>http://www.undolog.com/2008/05/30/papervision3d-basicview/</link>
		<comments>http://www.undolog.com/2008/05/30/papervision3d-basicview/#comments</comments>
		<pubDate>Fri, 30 May 2008 07:57:42 +0000</pubDate>
		<dc:creator>Giovambattista Fazioli</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Papervsion3D]]></category>
		<category><![CDATA[Sviluppo]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[BasicView]]></category>
		<category><![CDATA[Great White]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[singleRender()]]></category>

		<guid isPermaLink="false">http://www.undolog.com/?p=414</guid>
		<description><![CDATA[Papervision3D 2.0 (GreatWhite) è in continuo sviluppo e sono molte le funzione che quasi settimanalmente vengono aggiunte. Ad aprile è stato inaugurato il blog dedicato agli sviluppatori (http://dev.papervision3d.org/), tuttavia, la release 2.0, non è ancora stata rilasciata ufficialemente è spesso difficile carpirne le vere potenzialità. Una delle recenti novità introdotte, comunque, è il nuovo oggetto [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://blog.papervision3d.org/2007/12/05/papervision3d-20-alpha-great-white/">Papervision3D 2.0 (GreatWhite)</a> è in continuo sviluppo e sono molte le funzione che quasi settimanalmente vengono aggiunte. Ad aprile è stato inaugurato il blog dedicato agli sviluppatori (<a target="_blank" href="http://dev.papervision3d.org/">http://dev.papervision3d.org/</a>), tuttavia, la release 2.0, non è ancora stata rilasciata ufficialemente è spesso difficile carpirne le vere potenzialità. Una delle recenti novità introdotte, comunque, è il nuovo oggetto <code>BasicView</code> che crea un'ambiente 3D con pochissime righe di codice. Basta infatti creare questo oggetto per avere a disposizione scena, viewport e camera in un colpo solo.</p>
<p><span id="more-414"></span></p>
<p>Normalmente si dovevano creare manualmente gli oggetti base per <em>rendere</em> una scena:</p>
<div class="igBar"><span id="lactionscript3-100"><a href="#" onclick="javascript:showCodeTxt('actionscript3-100'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-100">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @name &nbsp; &nbsp; &nbsp; &nbsp;: initPapervision()</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @description : esempio di inizializzazione di Papervision3D prima di GreatWhite</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> initPapervision<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; viewport &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">new</span> Viewport3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> viewport <span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; scene &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= <span style="color: #0033ff; font-weight: bold;">new</span> Scene3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; camera &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">new</span> Camera3D<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; renderer &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color: #0033ff; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Adesso basta usare:</p>
<div class="igBar"><span id="lactionscript3-101"><a href="#" onclick="javascript:showCodeTxt('actionscript3-101'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-101">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">/*</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @name &nbsp; &nbsp; &nbsp; &nbsp;: initPapervision()</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">** @description : esempio di inizializzazione di Papervision3D con GreatWhite</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3f5fbf;">*/</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> initPapervision<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; bv = <span style="color: #0033ff; font-weight: bold;">new</span> BasicView<span style="color: #000000;">&#40;</span>640<span style="color: #000066; font-weight: bold;">,</span> 480<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span> bv<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Dalla <code>BasciView</code> è possibile accedere a tutti gli oggetti che prima venivano creati manualmente, ad esempio:</p>
<div class="igBar"><span id="lactionscript3-102"><a href="#" onclick="javascript:showCodeTxt('actionscript3-102'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript3-102">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">...</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bv<span style="color: #000066; font-weight: bold;">.</span>camera<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">zoom</span> = <span style="color: #000000; font-weight:bold;color:#800000;">2</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">...</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bv<span style="color: #000066; font-weight: bold;">.</span>scene<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>photo1<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">...</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bv<span style="color: #000066; font-weight: bold;">.</span>cameraAsCamera3D<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span> = mytarget<span style="color: #000066; font-weight: bold;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#758DB8;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">...</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#FF9900;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bv<span style="color: #000066; font-weight: bold;">.</span>singleRender<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>




	<a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView&amp;bodytext=Papervision3D%202.0%20%28GreatWhite%29%20%C3%A8%20in%20continuo%20sviluppo%20e%20sono%20molte%20le%20funzione%20che%20quasi%20settimanalmente%20vengono%20aggiunte.%20Ad%20aprile%20%C3%A8%20stato%20inaugurato%20il%20blog%20dedicato%20agli%20sviluppatori%20%28http%3A%2F%2Fdev.papervision3d.org%2F%29%2C%20tuttavia%2C%20la%20release%202.0%2C%20no" title="Digg"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView&amp;notes=Papervision3D%202.0%20%28GreatWhite%29%20%C3%A8%20in%20continuo%20sviluppo%20e%20sono%20molte%20le%20funzione%20che%20quasi%20settimanalmente%20vengono%20aggiunte.%20Ad%20aprile%20%C3%A8%20stato%20inaugurato%20il%20blog%20dedicato%20agli%20sviluppatori%20%28http%3A%2F%2Fdev.papervision3d.org%2F%29%2C%20tuttavia%2C%20la%20release%202.0%2C%20no" title="del.icio.us"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="Technorati"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;t=Papervision3D%3A%20BasicView" title="Facebook"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView&amp;annotation=Papervision3D%202.0%20%28GreatWhite%29%20%C3%A8%20in%20continuo%20sviluppo%20e%20sono%20molte%20le%20funzione%20che%20quasi%20settimanalmente%20vengono%20aggiunte.%20Ad%20aprile%20%C3%A8%20stato%20inaugurato%20il%20blog%20dedicato%20agli%20sviluppatori%20%28http%3A%2F%2Fdev.papervision3d.org%2F%29%2C%20tuttavia%2C%20la%20release%202.0%2C%20no" title="Google Bookmarks"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://twitter.com/home?status=Papervision3D%3A%20BasicView%20-%20http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="Twitter"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://barrapunto.com/submit.pl?subj=Papervision3D%3A%20BasicView&amp;story=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="BarraPunto"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/barrapunto.png" title="BarraPunto" alt="BarraPunto" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://current.com/clipper.htm?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView" title="Current"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/current.png" title="Current" alt="Current" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="mailto:?subject=Papervision3D%3A%20BasicView&amp;body=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="email"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.friendfeed.com/share?title=Papervision3D%3A%20BasicView&amp;link=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="FriendFeed"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/friendfeed.png" title="FriendFeed" alt="FriendFeed" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://laaik.it/NewStoryCompact.aspx?uri=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;headline=Papervision3D%3A%20BasicView&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12" title="laaik.it"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/laaikit.png" title="laaik.it" alt="laaik.it" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView&amp;source=Undolog.com+Research+%26amp%3B+Development++Blog&amp;summary=Papervision3D%202.0%20%28GreatWhite%29%20%C3%A8%20in%20continuo%20sviluppo%20e%20sono%20molte%20le%20funzione%20che%20quasi%20settimanalmente%20vengono%20aggiunte.%20Ad%20aprile%20%C3%A8%20stato%20inaugurato%20il%20blog%20dedicato%20agli%20sviluppatori%20%28http%3A%2F%2Fdev.papervision3d.org%2F%29%2C%20tuttavia%2C%20la%20release%202.0%2C%20no" title="LinkedIn"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView" title="Live"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;t=Papervision3D%3A%20BasicView" title="MySpace"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.netvibes.com/share?title=Papervision3D%3A%20BasicView&amp;url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="Netvibes"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/netvibes.png" title="Netvibes" alt="Netvibes" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;partner=sociable" title="Print"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.undolog.com/feed/" title="RSS"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://segnalo.alice.it/post.html.php?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView" title="Segnalo"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/segnalo.png" title="Segnalo" alt="Segnalo" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F&amp;title=Papervision3D%3A%20BasicView" title="StumbleUpon"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  href="http://www.wikio.it/vote?url=http%3A%2F%2Fwww.undolog.com%2F2008%2F05%2F30%2Fpapervision3d-basicview%2F" title="Wikio IT"><img src="http://www.undolog.com/wp-content/plugins/sociable/images/wikio.png" title="Wikio IT" alt="Wikio IT" class="sociable-hovers" /></a>


<br/><br/>
	Tags: <a href="http://www.undolog.com/tag/3d/" title="3D" rel="tag">3D</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/3d-flash-cs3-sviluppo/" title="3D" rel="tag">3D</a>, <a href="http://www.undolog.com/tag/actionscript-30/" title="Actionscript 3.0" rel="tag">Actionscript 3.0</a>, <a href="http://www.undolog.com/tag/basicview/" title="BasicView" rel="tag">BasicView</a>, <a href="http://www.undolog.com/category/sviluppo/flash/" title="Flash" rel="tag">Flash</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/flash-cs3/" title="Flash CS3" rel="tag">Flash CS3</a>, <a href="http://www.undolog.com/tag/great-white/" title="Great White" rel="tag">Great White</a>, <a href="http://www.undolog.com/category/sviluppo/internet/" title="Internet" rel="tag">Internet</a>, <a href="http://www.undolog.com/tag/papervision3d/" title="Papervision3D" rel="tag">Papervision3D</a>, <a href="http://www.undolog.com/category/sviluppo/flash-cs3/3d-flash-cs3-sviluppo/papervsion3d/" title="Papervsion3D" rel="tag">Papervsion3D</a>, <a href="http://www.undolog.com/tag/singlerender/" title="singleRender()" rel="tag">singleRender()</a>, <a href="http://www.undolog.com/category/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/tag/sviluppo/" title="Sviluppo" rel="tag">Sviluppo</a>, <a href="http://www.undolog.com/category/tutorials/" title="Tutorials" rel="tag">Tutorials</a><br />

	<h4>Post correlati</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.undolog.com/2008/06/17/piclens-in-flash-con-papervision3d-20-parte-ii/" title="PicLens in Flash con Papervision3D 2.0: parte II (17 giugno, 2008)">PicLens in Flash con Papervision3D 2.0: parte II</a> (14)</li>
	<li><a href="http://www.undolog.com/2008/04/28/piclens-in-flash-con-papervision3d-20/" title="Piclens in Flash con Papervision3D 2.0 (28 aprile, 2008)">Piclens in Flash con Papervision3D 2.0</a> (2)</li>
	<li><a href="http://www.undolog.com/2008/04/17/installare-papervision3d-20-great-white-tortoisesvn/" title="Installare Papervision3D 2.0 Great White: TortoiseSVN (17 aprile, 2008)">Installare Papervision3D 2.0 Great White: TortoiseSVN</a> (6)</li>
	<li><a href="http://www.undolog.com/2008/05/05/papervision3d-gestire-le-bitmap-come-in-five3d/" title="Papervision3D: gestire le Bitmap come in FIVe3D (5 maggio, 2008)">Papervision3D: gestire le Bitmap come in FIVe3D</a> (0)</li>
	<li><a href="http://www.undolog.com/2008/05/16/five3d-effetti-speciali-su-un-cubo-in-attesa-di-flash-10/" title="FIVe3D: effetti speciali su un cubo! In attesa di Flash 10 (16 maggio, 2008)">FIVe3D: effetti speciali su un cubo! In attesa di Flash 10</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.undolog.com/2008/05/30/papervision3d-basicview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
