<?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>buenojustbe.com</title>
	<atom:link href="http://buenojustbe.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://buenojustbe.com/blog</link>
	<description>Bem-vindo(a) ao meu mundo.</description>
	<lastBuildDate>Wed, 25 Nov 2009 13:20:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sistema de partículas</title>
		<link>http://buenojustbe.com/blog/2009/11/sistema-de-particulas/</link>
		<comments>http://buenojustbe.com/blog/2009/11/sistema-de-particulas/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 12:22:53 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=380</guid>
		<description><![CDATA[Assunto:
Desenvolvendo uma aplicação simples de partículas.
ActionScript:
Versão 3.0
Instruções Adicionais:

Crie um novo Arquivo Flash AS3
Primeiramente vamos criar um pequeno círculo que posteriormente será nossa particula.
Transforme o círculo em um Movie Clip (F8), de nome “Bola”.
Exclua o Movie Clip “Bola” do palco, repare que agora ele está apenas na biblioteca (Ctrl + L).
Salve o arquivo como “particulas.fla”.
Agora vamos [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="text-align: justify;">Desenvolvendo uma aplicação simples de partículas.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 3.0</p>
<p><strong>Instruções Adicionais:</strong></p>
<ol>
<li>Crie um novo Arquivo Flash AS3</li>
<li>Primeiramente vamos criar um pequeno círculo que posteriormente será nossa particula.</li>
<li>Transforme o círculo em um Movie Clip (F8), de nome <strong>“Bola”</strong>.</li>
<li>Exclua o Movie Clip <strong>“Bola”</strong> do palco, repare que agora ele está apenas na biblioteca (Ctrl + L).</li>
<li>Salve o arquivo como <strong>“particulas.fla”</strong>.</li>
<li>Agora vamos criar a classe externa que irá controlar as particulas. Crie um novo Arquivo Actionscript (File -&gt; Actionscript File <strong>“.as”</strong>) e insira o código abaixo:
<ol>
<li>Repare que ao criarmos a classe, dizemos que ela vai herdar tudo que a classe Movie Clip contiver (<strong>extends MovieClip)</strong>. Com isso, podemos acessar propriedades e métodos contidos no Movie Clip e nossa classe Particulas será uma filha da classe Movie Clip.</li>
<li>Tenha o cuidado para salvar o arquivo na mesma pasta que o arquivo <strong>“particulas.fla”</strong>, salve com o mesmo nome descrito na classe (fique atento para as letras maiusculas e minusculas, isto também infuencia), no caso, “<strong>Particulas.as”</strong>.</li>
</ol>
</li>
<p><strong><strong>Código da classe &#8220;Particulas.as&#8221;:</strong></strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax1"></a><a style="wp-synhighlighter-title" href="#codesyntax1"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript3" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><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: normal; vertical-align:top;"><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;"><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: #000000; font-weight: bold;">*</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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: #9900cc; font-weight: bold;">class</span> Particulas extends <a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MovieClip</span></a><span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">// Variáveis</span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #6699cc; font-weight: bold;">var</span> velocidadeX<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Number</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><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: #6699cc; font-weight: bold;">var</span> velocidadeY<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Number</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><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: #6699cc; font-weight: bold;">var</span> rotacao<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Number</span></a>;</div></li><li style="font-weight: bold; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">// Metódo contrutor, inicializador da classe</span></div></li><li style="font-weight: normal; vertical-align:top;"><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> Particulas<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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> velocidadeX = <span style="color: #000000; font-weight:bold;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> velocidadeY = <span style="color: #000000; font-weight:bold;">0</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> rotacao = <span style="color: #000000; font-weight:bold;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #009900;">// Função de atualizar as variáveis</span></div></li><li style="font-weight: normal; vertical-align:top;"><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> atualizador<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;"><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;">this</span>.<span style="color: #004993;">x</span><span style="color: #000000; font-weight: bold;">+</span>=velocidadeX;</div></li><li style="font-weight: normal; vertical-align:top;"><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;">this</span>.<span style="color: #004993;">y</span><span style="color: #000000; font-weight: bold;">+</span>=velocidadeY;</div></li><li style="font-weight: normal; vertical-align:top;"><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;">this</span>.<span style="color: #004993;">rotation</span><span style="color: #000000; font-weight: bold;">+</span>=rotacao;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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: bold; vertical-align:top;"><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></pre></div></div></p>
<p><strong>Continuação das Instruções Adicionais:</strong></p>
<li>Abra o arquivo “<strong>particulas.fla</strong>”.</li>
<li>Depois precisamos que o Movie Clip <strong>“Bola”</strong> é do tipo Particulas, para isso, abra a biblioteca      pressionando <strong>&lt;Ctrl+L&gt; </strong>e clique com o botão direito do mouse      sobre o Movie Clip <strong>“Bola”</strong>,      selecione “<strong>Propriedades</strong>”. No painel das propriedades do símbolo deixe      como na figura abaixo (clique na imagem para ampliar).</li>
<p style="text-align: center;"><a href="http://buenojustbe.com/blog/wp-content/uploads/2009/11/particulas_screen2.png"><img class="aligncenter size-medium wp-image-381" title="Particulas" src="http://buenojustbe.com/blog/wp-content/uploads/2009/11/particulas_screen2-300x249.png" alt="Particulas" width="300" height="249" target="_blank"/></a></p>
<li>Assim, toda as vezes que instanciarmos um Movie Clip do tipo bola ele já trará todas as funções e métodos da classe “<strong>Particulas.as”.</strong></li>
<li>Após isso, apenas nos resta colocar o código para criar estas partículas e aplicar as funções presentes na classe. Segue abaixo o código.</li>
</ol>
<p><strong><strong>Código AS3:</strong></strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax2"></a><a style="wp-synhighlighter-title" href="#codesyntax2"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript3" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><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> Particulas;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">// Variaveis</span></div></li><li style="font-weight: normal; vertical-align:top;"><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> pTotal<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">int</span></a>=<span style="color: #000000; font-weight:bold;">1000</span>; <span style="color: #009900;">//Total de partículas</span></div></li><li style="font-weight: bold; vertical-align:top;"><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> aParticulas<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=array%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:array.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Array</span></a>=<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">// Registro de Eventos</span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a>.<span style="color: #004993;">ENTER_FRAME</span>, _anima<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">//Funções</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> _anima<span style="color: #000000;">&#40;</span>e<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; 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;"><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;"><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>aParticulas.length<span style="color: #000000; font-weight: bold;">&lt;</span>pTotal<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><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> bola_mc<span style="color: #000000; font-weight: bold;">:</span>Bola = <span style="color: #0033ff; font-weight: bold;">new</span> Bola<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><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>bola_mc<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> bola_mc.velocidadeX=<a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Math</span></a>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">5</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> bola_mc.velocidadeY=<a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Math</span></a>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">10</span><span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">5</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> bola_mc.rotacao=<a href="http://www.google.com/search?q=math%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:math.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Math</span></a>.<span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">90</span><span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">10</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> bola_mc.<span style="color: #004993;">x</span>=<span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> bola_mc.<span style="color: #004993;">y</span>=<span style="color: #004993;">stage</span>.<span style="color: #004993;">stageHeight</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> aParticulas.<span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>bola_mc<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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;"><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;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">0</span>; i<span style="color: #000000; font-weight: bold;">&lt;</span>aParticulas.<span style="color: #004993;">length</span>; i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> aParticulas<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.atualizador<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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></pre></div></div></p>
<p><strong>DOWNLOAD:</strong></p>
<p><strong><a class="downloadlink" href="http://buenojustbe.com/blog/wp-content/plugins/download-monitor/download.php?id=4" title="Version1.0 downloaded 56 times" >Sistema de Partículas (56)</a><br />
</strong></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F11%2Fsistema-de-particulas%2F&amp;linkname=Sistema%20de%20part%C3%ADculas">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/11/sistema-de-particulas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alterando o ponteiro do mouse com perspectiva</title>
		<link>http://buenojustbe.com/blog/2009/10/alterando-mouse/</link>
		<comments>http://buenojustbe.com/blog/2009/10/alterando-mouse/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 13:17:16 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=362</guid>
		<description><![CDATA[Assunto:
Alterando o ponteiro do mouse com perspectiva.
ActionScript:
Versão 2.0 e 3.0
Instruções Adicionais:
1. Inicie um novo arquivo.
2. Crie um objeto que será o novo ponteiro do mouse e converta-o em movieclip.
3. Instancie-o como cursor.
4. Caso estiver trabalhando com actionscript 2, cópie e cole o código AS2 no movieclip cursor, se não, crie uma nova layer com o nome [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="TEXT-ALIGN: justify">Alterando o ponteiro do mouse com perspectiva.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 2.0 e 3.0</p>
<p><strong>Instruções Adicionais:</strong></p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>1.</strong> Inicie um novo arquivo.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>2.</strong> Crie um objeto que será o novo ponteiro do mouse e converta-o em <em>movieclip</em>.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>3.</strong> Instancie-o como <em>cursor</em>.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>4.</strong> Caso estiver trabalhando com actionscript 2, cópie e cole o código AS2 no movieclip <em>cursor</em>, se não, crie uma nova layer com o nome <em>action</em> e cole o código do AS3.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>5.</strong> Pronto, Ctrl+Enter.</p>
<p><strong><strong>Código AS2:</strong></strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax3"></a><a style="wp-synhighlighter-title" href="#codesyntax3"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">onClipEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">Mouse</span>.<span style="color: #0066CC;">hide</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">onClipEvent</span><span style="color: #66cc66;">&#40;</span>enterFrame<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">_x</span> = <span style="color: #0066CC;">_root</span>.<span style="color: #0066CC;">_xmouse</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">_y</span> = <span style="color: #0066CC;">_root</span>.<span style="color: #0066CC;">_ymouse</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">_rotation</span> = <span style="color: #0066CC;">_root</span>.<span style="color: #0066CC;">_xmouse</span><span style="color: #66cc66;">/</span><span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">width</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre></div></div></p>
<p><strong><strong><strong>Código AS3:</strong></strong></strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax4"></a><a style="wp-synhighlighter-title" href="#codesyntax4"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript3" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><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>.<a href="http://www.google.com/search?q=stage%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:stage.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Stage</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><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.ui</span>.<a href="http://www.google.com/search?q=mouse%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouse.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Mouse</span></a>;</div></li><li style="font-weight: normal; vertical-align:top;"><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.events</span>.<span style="color: #000000; font-weight: bold;">*</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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=mouse%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouse.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Mouse</span></a>.<span style="color: #004993;">hide</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">// criando o event listener</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a>.<span style="color: #004993;">ENTER_FRAME</span>, fncOnEnterFrame<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> fncOnEnterFrame<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; 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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> cursor.<span style="color: #004993;">x</span>= <span style="color: #004993;">mouseX</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> cursor.<span style="color: #004993;">y</span>= <span style="color: #004993;">mouseY</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> cursor.<span style="color: #004993;">rotation</span> = <span style="color: #004993;">mouseX</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">100</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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></pre></div></div></p>
<p><strong>DOWNLOAD:</strong></p>
<a class="downloadlink" href="http://buenojustbe.com/blog/wp-content/plugins/download-monitor/download.php?id=3" title=" downloaded 37 times" >Arquivos Fonte (37)</a>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F10%2Falterando-mouse%2F&amp;linkname=Alterando%20o%20ponteiro%20do%20mouse%20com%20perspectiva">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/10/alterando-mouse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centralizando MovieClips no Stage</title>
		<link>http://buenojustbe.com/blog/2009/10/centralizando-movieclips/</link>
		<comments>http://buenojustbe.com/blog/2009/10/centralizando-movieclips/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 12:53:28 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=357</guid>
		<description><![CDATA[Assunto:
Centralizando movieclips atacados da biblioteca no Stage.
ActionScript:
Versão 2.0
Instruções Adicionais:
1. Inicie um novo arquivo.
2. Crie um quadrado e converta-o em movieclip.
3. Instancie-o na biblioteca como posicao.
4. Nomeie a primeira layer como action.
5. Precione F9 para acessar o console de actions e cole o código abaixo.
6. Pronto, Ctrl+Enter.
Código:
DOWNLOAD:
Favoritos/Partilhar]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="text-align: justify;">Centralizando movieclips atacados da biblioteca no Stage.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 2.0</p>
<p><strong>Instruções Adicionais:</strong></p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>1.</strong> Inicie um novo arquivo.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>2.</strong> Crie um <em>quadrado</em> e converta-o em <em>movieclip</em>.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>3.</strong> Instancie-o na biblioteca como <em>posicao</em>.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>4.</strong> Nomeie a primeira layer como <em>action.</em></p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>5.</strong> Precione F9 para acessar o console de actions e cole o código abaixo.</p>
<p style="TEXT-ALIGN: justify; PADDING-LEFT: 30px"><strong>6.</strong> Pronto, Ctrl+Enter.</p>
<p><strong>Código:</strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax5"></a><a style="wp-synhighlighter-title" href="#codesyntax5"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> palavra = <span style="color: #ff0000;">&quot;BUENO&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> posInicial = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> comprimento = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> distancia = <span style="color: #cc66cc;">10</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">1</span>; i<span style="color: #66cc66;">&lt;</span>=palavra.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">attachMovie</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;posicao&quot;</span>,<span style="color: #ff0000;">&quot;mcPosicao&quot;</span>+i,i<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> comprimento += <span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;mcPosicao&quot;</span>+i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_width</span>+distancia;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">posInicial = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Stage</span>.<span style="color: #006600;">width</span>-comprimento<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>j=<span style="color: #cc66cc;">1</span>; j<span style="color: #66cc66;">&lt;</span>=palavra.<span style="color: #0066CC;">length</span>; j++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;mcPosicao&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = j<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;mcPosicao&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_width</span>+distancia<span style="color: #66cc66;">&#41;</span>+<span style="color: #66cc66;">&#40;</span>posInicial-<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;mcPosicao&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_width</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>-<span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;mcPosicao&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre></div></div></p>
<p><strong>DOWNLOAD:</strong></p>
<a class="downloadlink" href="http://buenojustbe.com/blog/wp-content/plugins/download-monitor/download.php?id=2" title=" downloaded 22 times" >Arquivo fonte (22)</a>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F10%2Fcentralizando-movieclips%2F&amp;linkname=Centralizando%20MovieClips%20no%20Stage">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/10/centralizando-movieclips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limitando o campo de digitação (Input Text)</title>
		<link>http://buenojustbe.com/blog/2009/10/limitando-campo-digitacao/</link>
		<comments>http://buenojustbe.com/blog/2009/10/limitando-campo-digitacao/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 14:20:17 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=327</guid>
		<description><![CDATA[Assunto:
Limitando o campo de entrada de texto.
ActionScript:
Versão 2.0
Instruções Adicionais:
1. Inicie um novo arquivo.
2. Crie um campo dinâmico no Stage e instancie-o com o nome desejado.
3. Redimencione este campo para o tamanho desejado e aplique as formatações de texto.
4. Crie uma nova layer e nomei-a como action.
5. Precione F9 para acessar o console de actions e [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="text-align: justify;">Limitando o campo de entrada de texto.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 2.0</p>
<p><strong>Instruções Adicionais:</strong></p>
<p style="text-align: justify; padding-left: 30px;"><strong>1.</strong> Inicie um novo arquivo.</p>
<p style="text-align: justify; padding-left: 30px;"><strong>2.</strong> Crie um campo dinâmico no Stage e instancie-o com o nome desejado.</p>
<p style="text-align: justify; padding-left: 30px;"><strong>3.</strong> Redimencione este campo para o tamanho desejado e aplique as formatações de texto.</p>
<p style="text-align: justify; padding-left: 30px;"><strong>4.</strong> Crie uma nova layer e nomei-a como <em>action.</em></p>
<p style="text-align: justify; padding-left: 30px;"><strong>5.</strong> Precione F9 para acessar o console de actions e cole o código abaixo substituindo o nome_do_campo.</p>
<p style="text-align: justify; padding-left: 30px;"><strong>6.</strong> Pronto, Ctrl+Enter.</p>
<p><strong>Código:</strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax6"></a><a style="wp-synhighlighter-title" href="#codesyntax6"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">// Ouvinte que é executado a cada notifição efetuada no campo em questão</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">nome_do_campo.<span style="color: #0066CC;">onChanged</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #808080; font-style: italic;">// Efetua uma conferência, que quando a rolagem do texto for maior do que 1 ele removerá o último carácter digitado</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">maxscroll</span><span style="color: #66cc66;">&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">substr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">length</span>-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div></li></ol></pre></div></div></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F10%2Flimitando-campo-digitacao%2F&amp;linkname=Limitando%20o%20campo%20de%20digita%C3%A7%C3%A3o%20%28Input%20Text%29">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/10/limitando-campo-digitacao/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Criando gráficos dinâmicos a partir de dados obtidos de um XML</title>
		<link>http://buenojustbe.com/blog/2009/10/criando-graficos-dinamicos-a-partir-de-dados-obtidos-de-um-xml/</link>
		<comments>http://buenojustbe.com/blog/2009/10/criando-graficos-dinamicos-a-partir-de-dados-obtidos-de-um-xml/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 13:42:09 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=323</guid>
		<description><![CDATA[Assunto:
Metódo para criar gráficos dinâmicos utilizando dados obtidos de um XML.
ActionScript:
Versão 2.0
Código AS:
Código XML:
DOWNLOAD:
Favoritos/Partilhar]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="TEXT-ALIGN: justify">Metódo para criar gráficos dinâmicos utilizando dados obtidos de um XML.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 2.0</p>
<p><strong>Código AS:</strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax7"></a><a style="wp-synhighlighter-title" href="#codesyntax7"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">#include &quot;mc_tween2.as&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">effects</span>.<span style="color: #006600;">Tween</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">corpo0.<span style="color: #0066CC;">_alpha</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">System</span>.<span style="color: #0066CC;">useCodepage</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> graf_xml:<span style="color: #0066CC;">XML</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">graf_xml.<span style="color: #0066CC;">ignoreWhite</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">graf_xml.<span style="color: #0066CC;">onLoad</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>ok:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>ok<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Arquivo XML encontrado.&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  gerarGrafico<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Arquivo XML não encontrado.&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">graf_xml.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;grafico.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> gerarGrafico<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">xmlNode</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">var</span> len:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">xmlNode</span>.<span style="color: #0066CC;">length</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">var</span> total:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #000000; font-weight: bold;">var</span> perc:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">1</span>; i<span style="color: #66cc66;">&lt;</span>len; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span>.<span style="color: #006600;">corpo0</span>.<span style="color: #0066CC;">duplicateMovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+i,<span style="color: #0066CC;">getNextHighestDepth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span>.<span style="color: #006600;">texto0</span>.<span style="color: #0066CC;">duplicateMovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+i,<span style="color: #0066CC;">getNextHighestDepth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>a=<span style="color: #cc66cc;">0</span>; a<span style="color: #66cc66;">&lt;</span>len; a++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  total += <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">xmlNode</span><span style="color: #66cc66;">&#91;</span>a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">valor</span> = <span style="color: #0066CC;">parseInt</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">xmlNode</span><span style="color: #66cc66;">&#91;</span>a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">corpo0</span>.<span style="color: #0066CC;">_x</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #66cc66;">&#40;</span>a<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_width</span>+<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_alpha</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_yscale</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">id</span> = a;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span> = <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_x</span>+<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_width</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>-<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+a<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_width</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>j=<span style="color: #cc66cc;">0</span>; j<span style="color: #66cc66;">&lt;</span>len; j++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  perc = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">valor</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span>total<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">perc</span> = perc;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">alphaTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">0.3</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">tween</span> = <span style="color: #000000; font-weight: bold;">new</span> Tween<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>, <span style="color: #cc66cc;">100</span>, perc, <span style="color: #cc66cc;">1500</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">onTweenUpdate</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+<span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">s_txt</span>.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">perc</span>+<span style="color: #ff0000;">&quot;%&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">perc</span><span style="color: #66cc66;">&lt;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+<span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_y</span>+<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_height</span>+<span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+<span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_height</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #0066CC;">_root</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;texto&quot;</span>+<span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">_y</span> = <span style="color: #0066CC;">this</span>._y-<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_height</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_yscale</span> = p;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">onTweenEnd</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onTweenUpdate</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>._color = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Color</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">onRollOver</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">this</span>._color.<span style="color: #0066CC;">setTransform</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>rb:<span style="color: #cc66cc;">204</span>, gb:<span style="color: #cc66cc;">0</span>, bb:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onRelease</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    titulo_txt.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">xmlNode</span><span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    valor_txt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;QTDE: &quot;</span>+<span style="color: #0066CC;">xmlNode</span><span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span>+<span style="color: #ff0000;">&quot; - PORCENTAGEM: &quot;</span>+<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_yscale</span>+<span style="color: #ff0000;">&quot;%&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    desc_txt.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">xmlNode</span><span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">childNodes</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">onRollOut</span> = <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">onReleaseOutside</span>=<span style="color: #000000; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   <span style="color: #0066CC;">this</span>._color.<span style="color: #0066CC;">setTransform</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>rb:<span style="color: #cc66cc;">0</span>, gb:<span style="color: #cc66cc;">0</span>, bb:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">   info_txt.<span style="color: #0066CC;">removeTextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">  <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;corpo&quot;</span>+j<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">tween</span>.<span style="color: #006600;">easingEquation</span> = mx.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">easing</span>.<span style="color: #006600;">Elastic</span>.<span style="color: #006600;">easeOut</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre></div></div></p>
<p><strong>Código XML:</strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax8"></a><a style="wp-synhighlighter-title" href="#codesyntax8"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Code</a></div><div class="wp-synhighlighter-inner"><pre class="xml" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;grafico<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;dado<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;valor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>235<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/valor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: bold; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;titulo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>TITULO1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/titulo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;desc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>DESCRICAO1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/desc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;/dado<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;dado<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;valor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>150<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/valor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: bold; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;titulo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>TITULO2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/titulo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;desc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>DESCRICAO2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/desc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;/dado<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;dado<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;valor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>183<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/valor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: bold; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;titulo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>TITULO3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/titulo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;desc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>DESCRICAO3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/desc<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;/dado<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li><li style="font-weight: normal; vertical-align:top;"><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: #000000; font-weight: bold;">&lt;/grafico<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></li></ol></pre></div></div></p>
<p><strong>DOWNLOAD:</strong></p>
<a class="downloadlink" href="http://buenojustbe.com/blog/wp-content/plugins/download-monitor/download.php?id=1" title=" downloaded 43 times" >Arquivo fonte (43)</a>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F10%2Fcriando-graficos-dinamicos-a-partir-de-dados-obtidos-de-um-xml%2F&amp;linkname=Criando%20gr%C3%A1ficos%20din%C3%A2micos%20a%20partir%20de%20dados%20obtidos%20de%20um%20XML">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/10/criando-graficos-dinamicos-a-partir-de-dados-obtidos-de-um-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Utilizando a classe Selection</title>
		<link>http://buenojustbe.com/blog/2009/08/utilizando_classe_selection/</link>
		<comments>http://buenojustbe.com/blog/2009/08/utilizando_classe_selection/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 17:52:34 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=301</guid>
		<description><![CDATA[Assunto:
A classe Selection permite que você defina e controle o campo de texto no qual está localizado o ponto de inserção, ou seja, o campo que possui o foco. Os índices do intervalo de seleção são baseados em zero (por exemplo, a primeira posição é 0, a segunda é 1 e assim por diante).
Não há [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="text-align: justify;">A classe Selection permite que você defina e controle o campo de texto no qual está localizado o ponto de inserção, ou seja, o campo que possui o foco. Os índices do intervalo de seleção são baseados em zero (por exemplo, a primeira posição é 0, a segunda é 1 e assim por diante).</p>
<p style="text-align: justify;">Não há nenhuma função construtora para a classe Selection, pois só pode haver um campo focalizado por vez.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 2.0</p>
<p><strong>Código:</strong><br />
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax9"></a><a style="wp-synhighlighter-title" href="#codesyntax9"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Código</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//especifica a formatação da caixa de texto</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">formata = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">with</span> <span style="color: #66cc66;">&#40;</span>formata<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #808080; font-style: italic;">//definição de fonte</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">font</span> = <span style="color: #ff0000;">&quot;Verdana&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #808080; font-style: italic;">//atribuindo o estilo negrito</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">bold</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #808080; font-style: italic;">//atribuindo tamanho 13</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">13</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #808080; font-style: italic;">//atribuindo cor preto</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">color</span> = <span style="color: #cc66cc;">0</span>000000;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #808080; font-style: italic;">//incorporando caracteres</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">embedFonts</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//cria o campo TextField</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">createTextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;campo&quot;</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">200</span>,<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//determina o tipo como entrada (input)</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">campo.<span style="color: #0066CC;">type</span> = <span style="color: #ff0000;">&quot;input&quot;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//determina a suavição de bordas para avançado</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">campo.<span style="color: #006600;">antiAliasType</span> = AntiAliasType.<span style="color: #006600;">ADVANCED</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//ativa a borda do campo</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">campo.<span style="color: #0066CC;">border</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//determina o máximo de caracteres permitido no campo</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">campo.<span style="color: #0066CC;">maxChars</span> = <span style="color: #cc66cc;">15</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//toda vez que o campo (input) recebe um evento (teclado/mouse) ele aplica a formatação no mesmo.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">campo.<span style="color: #0066CC;">onChanged</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">setTextFormat</span><span style="color: #66cc66;">&#40;</span>formata<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #808080; font-style: italic;">//cria uma variavel para armazenar a informação selecionada</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> trecho:<span style="color: #0066CC;">String</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> selecao = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">selecao.<span style="color: #0066CC;">onMouseUp</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> trecho = <span style="color: #ff0000;">&quot;&quot;</span>;<span style="color: #808080; font-style: italic;">//limpa a váriavel que armazena o que foi selecionado</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> numInicial = <span style="color: #0066CC;">Selection</span>.<span style="color: #0066CC;">getBeginIndex</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//pega onde o texto selecionado inicia</span></div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> numFinal = <span style="color: #0066CC;">Selection</span>.<span style="color: #0066CC;">getEndIndex</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//pega onde o texto selecionado termina</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> trecho = campo.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span>numInicial, numFinal<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>trecho<span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">Mouse</span>.<span style="color: #0066CC;">addListener</span><span style="color: #66cc66;">&#40;</span>selecao<span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre></div></div></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F08%2Futilizando_classe_selection%2F&amp;linkname=Utilizando%20a%20classe%20Selection">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/08/utilizando_classe_selection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Randomizar array utilizando prototype</title>
		<link>http://buenojustbe.com/blog/2009/08/randomizar-array-utilizando-prototype/</link>
		<comments>http://buenojustbe.com/blog/2009/08/randomizar-array-utilizando-prototype/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 12:19:13 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=298</guid>
		<description><![CDATA[Assunto:
Propriedade; em função de construtor, a propriedade prototype refere-se a um objeto que é o protótipo da classe construída. Cada instância da classe que é criada pela função de construtor herda todas as propriedades e métodos do objeto protótipo.
ActionScript:
Versão 2.0
Código:
Favoritos/Partilhar]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="text-align: justify;">Propriedade; em função de construtor, a propriedade <em>prototype</em> refere-se a um objeto que é o protótipo da classe construída. Cada instância da classe que é criada pela função de construtor herda todas as propriedades e métodos do objeto protótipo.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 2.0</p>
<p><strong>Código:</strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax10"></a><a style="wp-synhighlighter-title" href="#codesyntax10"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Código</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">Array</span>.<span style="color: #0066CC;">prototype</span>.<span style="color: #006600;">randomize</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">sort</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span>a, b<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">floor</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #cc66cc;">1</span> : -<span style="color: #cc66cc;">1</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"> <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myArray = <span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">7</span>, <span style="color: #cc66cc;">8</span>, <span style="color: #cc66cc;">9</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#93;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>myArray.<span style="color: #006600;">randomize</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre></div></div></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F08%2Frandomizar-array-utilizando-prototype%2F&amp;linkname=Randomizar%20array%20utilizando%20prototype">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/08/randomizar-array-utilizando-prototype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XIV Maratona de Programação</title>
		<link>http://buenojustbe.com/blog/2009/08/xiv-maratona-de-programacao/</link>
		<comments>http://buenojustbe.com/blog/2009/08/xiv-maratona-de-programacao/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 11:03:35 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[Cursos]]></category>
		<category><![CDATA[Dicas]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=290</guid>
		<description><![CDATA[
A Maratona de Programação é um evento da Sociedade Brasileira de Computação que nasce das competições regionais classificatórias para as finais mundiais do concuso de programação ACM.
Ela se destina a alunos de cursos de graduação e início de pós-graduação na área de Computação e afins (Ciência da Computação, Engenharia de Computação, Sistemas de Informação, Matemática, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-291  aligncenter" title="Maratona de Programação" src="http://buenojustbe.com/blog/wp-content/uploads/2009/08/logomdp.jpg" alt="Maratona de Programação" width="243" height="235" /><a href="http://maratona.ime.usp.br/"></a></p>
<p style="text-align: justify;">A Maratona de Programação é um evento da Sociedade Brasileira de Computação que nasce das competições regionais classificatórias para as finais mundiais do concuso de programação ACM.</p>
<p style="text-align: justify;">Ela se destina a alunos de cursos de graduação e início de pós-graduação na área de Computação e afins (Ciência da Computação, Engenharia de Computação, Sistemas de Informação, Matemática, etc). A competição promove nos alunos a criatividade, a capacidade de trabalho em equipe, a busca de novas soluções de software e a habilidade de resolver problemas sob pressão. De ano para ano temos observado que as instituições e principalmente as grandes empresas da área têm valorizado os alunos que participam da Maratona.</p>
<p style="TEXT-ALIGN: justify">Os times são compostos por três alunos, que tentarão resolver durante 5 horas o maior número possível dos 8 ou mais problemas que são entregues no início da competição. Estes alunos têm à sua disposição apenas um computador e material impresso (livros, listagens, manuais) para vencer a batalha contra o relógio e os problemas propostos.</p>
<p style="TEXT-ALIGN: justify">Os competidores do time devem colaborar para descobrir os problemas mais fáceis, projetar os testes, e construir as soluções que sejam aprovadas pelos juízes da competição. Alguns problemas requerem apenas compreensão, outros conhecimento de técnicas mais sofisticadas, e alguns podem ser realmente muito difíceis de serem resolvidos.</p>
<p style="TEXT-ALIGN: justify">O julgamento é estrito. No início da competição os competidores recebem os problemas que devem ser resolvidos. Nos enunciados dos problemas constam exemplos dos dados dos problemas, mas eles não têm acesso às instâncias testadas pelos juízes. A cada submissão incorreta de um problema (ou seja, que deu resposta incorreta a uma das instâncias dos juízes) é atribuída uma penalidade de tempo. O time que conseguir resolver o maior número de problemas (no menor tempo acumulado com as penalidades, caso haja empate) é declarado o vencedor.</p>
<p style="TEXT-ALIGN: justify">Para mais infomações acesse: <a href="http://maratona.ime.usp.br/"><strong>Maratona de Programação</strong></a></p>
<h2 style="TEXT-ALIGN: justify"> </h2>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F08%2Fxiv-maratona-de-programacao%2F&amp;linkname=XIV%20Maratona%20de%20Programa%C3%A7%C3%A3o">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/08/xiv-maratona-de-programacao/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FadeIn e FadeOut</title>
		<link>http://buenojustbe.com/blog/2009/08/fadein-e-fadeout-em-actionscript-3-0/</link>
		<comments>http://buenojustbe.com/blog/2009/08/fadein-e-fadeout-em-actionscript-3-0/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 23:51:50 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=272</guid>
		<description><![CDATA[Assunto:
Efeito FadeIn e FadeOut da classe TransitionManager.
ActionScript:
Versão 3.0
Código:
!&#8211;c2&#8211;>
Favoritos/Partilhar]]></description>
			<content:encoded><![CDATA[<p><strong>Assunto:</strong></p>
<p style="TEXT-ALIGN: justify">Efeito FadeIn e FadeOut da classe TransitionManager.</p>
<p><strong>ActionScript:</strong></p>
<p>Versão 3.0</p>
<p><strong>Código:</strong></p>
<div><div class="wp-synhighlighter-expanded"><a name="#codesyntax11"></a><a style="wp-synhighlighter-title" href="#codesyntax11"  onClick="javascript:wpContainer=this.parentNode.parentNode.getElementsByTagName('div')[1];	if(wpContainer.style.display=='none') {wpContainer.style.display=''; this.parentNode.className='wp-synhighlighter-expanded'} 	else {wpContainer.style.display='none'; this.parentNode.className='wp-synhighlighter-collapsed'}">Código</a></div><div class="wp-synhighlighter-inner"><pre class="actionscript3" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><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> fl.transitions.<span style="color: #000000; font-weight: bold;">*</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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> fl.transitions.easing.<span style="color: #000000; font-weight: bold;">*</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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> clique<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=number%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:number.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Number</span></a>=<span style="color: #000000; font-weight:bold;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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> bt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MovieClip</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MovieClip</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bt.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0x000000<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bt.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">25</span>, <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">25</span>, <span style="color: #000000; font-weight:bold;">50</span>, <span style="color: #000000; font-weight:bold;">50</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bt.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bt.<span style="color: #004993;">x</span>=<span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bt.<span style="color: #004993;">y</span>=<span style="color: #004993;">stage</span>.<span style="color: #004993;">stageHeight</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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>bt<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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;"><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> mc<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MovieClip</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MovieClip</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mc.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">beginFill</span><span style="color: #000000;">&#40;</span>0xFF0000<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mc.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">drawRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">100</span>, <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">100</span>, <span style="color: #000000; font-weight:bold;">200</span>, <span style="color: #000000; font-weight:bold;">200</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mc.<span style="color: #004993;">graphics</span>.<span style="color: #004993;">endFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mc.<span style="color: #004993;">x</span>=<span style="color: #004993;">stage</span>.<span style="color: #004993;">stageWidth</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">mc.<span style="color: #004993;">y</span>=<span style="color: #004993;">stage</span>.<span style="color: #004993;">stageHeight</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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>mc<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><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;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">bt.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MouseEvent</span></a>.<span style="color: #004993;">CLICK</span>, mouseOverBox<span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> mouseOverBox<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=mouseevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:mouseevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">MouseEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; 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;"><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>clique==<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        clique=<span style="color: #000000; font-weight:bold;">1</span>;</div></li><li style="font-weight: bold; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        TransitionManager.<span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span>mc, <span style="color: #000000;">&#123;</span><span style="color: #004993;">type</span><span style="color: #000000; font-weight: bold;">:</span>Fade, direction<span style="color: #000000; font-weight: bold;">:</span>Transition.OUT, duration<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">3</span>, easing<span style="color: #000000; font-weight: bold;">:</span>Strong.easeOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        clique=<span style="color: #000000; font-weight:bold;">0</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        TransitionManager.<span style="color: #004993;">start</span><span style="color: #000000;">&#40;</span>mc, <span style="color: #000000;">&#123;</span><span style="color: #004993;">type</span><span style="color: #000000; font-weight: bold;">:</span>Fade, direction<span style="color: #000000; font-weight: bold;">:</span>Transition.IN, duration<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">3</span>, easing<span style="color: #000000; font-weight: bold;">:</span>Strong.easeOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;</div></li><li style="font-weight: normal; vertical-align:top;"><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: bold; vertical-align:top;"><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></pre></div></div><!--c2--></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F08%2Ffadein-e-fadeout-em-actionscript-3-0%2F&amp;linkname=FadeIn%20e%20FadeOut">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/08/fadein-e-fadeout-em-actionscript-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migração do ActionScript 2 para ActionScript 3</title>
		<link>http://buenojustbe.com/blog/2009/08/micracao-do-actionscript-2-para-actionscript-3/</link>
		<comments>http://buenojustbe.com/blog/2009/08/micracao-do-actionscript-2-para-actionscript-3/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 23:32:44 +0000</pubDate>
		<dc:creator>BUENO</dc:creator>
				<category><![CDATA[ActionScript 2]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://buenojustbe.com/blog/?p=266</guid>
		<description><![CDATA[Dicas e informações sobre a migração de AS2 para AS3.

SITES:
Adobe Flash CS4 Professional
ActionScript 3.0 e Componentes
Programação do Adobe ActionScript 3.0 para Adobe Flash
Tips for learning ActionScript 3.0
Getting Started with ActionScript 3.0 in Adobe Flash CS3
Learning ActionScript 3.0
ActionScript 3.0: Is It Hard or Not?
Flash CS3 &#8211; Migrando para o ActionScript 3
gotoandlearn.com &#8211; Free video tutorials by [...]]]></description>
			<content:encoded><![CDATA[<p>Dicas e informações sobre a migração de AS2 para AS3.</p>
<p class="wp-caption-dt" style="text-align: center;"><img class="aligncenter" title="AS2 to AS3" src="http://www.buenojustbe.com/HELP/as2as3.png" alt="AS2 to AS3" width="100" height="100" /><strong></strong></p>
<p class="wp-caption-dt" style="text-align: justify;"><strong>SITES:</strong><br />
<a href="http://help.adobe.com/pt_BR/Flash/10.0_Welcome/index.html" target="_blank">Adobe Flash CS4 Professional</a><br />
<a href="http://help.adobe.com/pt_BR/Flash/10.0_Welcome/WS091A3800-D889-4425-B647-C44097B73F34.html" target="_blank">ActionScript 3.0 e Componentes</a><br />
<a href="http://help.adobe.com/pt_BR/ActionScript/3.0_ProgrammingAS3/" target="_blank">Programação do Adobe ActionScript 3.0 para Adobe Flash</a><br />
<a href="http://www.adobe.com/devnet/actionscript/articles/actionscript_tips.html" target="_blank">Tips for learning ActionScript 3.0</a><br />
<a href="http://www.senocular.com/flash/tutorials/as3withflashcs3/" target="_blank">Getting Started with ActionScript 3.0 in Adobe Flash CS3</a><br />
<a href="http://www.learningactionscript3.com/" target="_blank">Learning ActionScript 3.0</a><br />
<a href="http://www.insideria.com/2008/01/actionscript-30-is-it-hard-or.html" target="_blank">ActionScript 3.0: Is It Hard or Not?</a><br />
<a href="http://imasters.uol.com.br/artigo/6570/flash/flash_cs3_-_migrando_para_o_actionscript_3/" target="_blank">Flash CS3 &#8211; Migrando para o ActionScript 3</a><br />
<a href="http://www.gotoandlearn.com/" target="_blank">gotoandlearn.com &#8211; Free video tutorials by Lee Brimelow on the Flash Platform</a><br />
<a href="http://www.5etdemi.com/convert/" target="_blank">Converter código AS2 para AS3</a></p>
<p><strong>DOWNLOAD:</strong><br />
<a href="http://www.buenojustbe.com/HELP/as3migracao.pdf" target="_blank">AS3 Migration</a><br />
<a href="http://help.adobe.com/pt_BR/ActionScript/3.0_ProgrammingAS3/flash_as3_programming.pdf" target="_blank">Adobe Flash AS3 Programando</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fbuenojustbe.com%2Fblog%2F2009%2F08%2Fmicracao-do-actionscript-2-para-actionscript-3%2F&amp;linkname=Migra%C3%A7%C3%A3o%20do%20ActionScript%202%20para%20ActionScript%203">Favoritos/Partilhar</a>]]></content:encoded>
			<wfw:commentRss>http://buenojustbe.com/blog/2009/08/micracao-do-actionscript-2-para-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
