<?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>Andrews Roberson &#187; colorshortcuts</title>
	<atom:link href="http://andrewsroberson.com.br/blog/tag/colorshortcuts/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewsroberson.com.br/blog</link>
	<description></description>
	<lastBuildDate>Tue, 22 Jun 2010 02:06:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Baixando a saturação em movieclips utilizando a classe caurina</title>
		<link>http://andrewsroberson.com.br/blog/2008/10/08/baixando-a-saturacao-em-movieclips-utilizando-a-classe-caurina/</link>
		<comments>http://andrewsroberson.com.br/blog/2008/10/08/baixando-a-saturacao-em-movieclips-utilizando-a-classe-caurina/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 05:53:31 +0000</pubDate>
		<dc:creator>Andrews</dc:creator>
				<category><![CDATA[labs]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[caurina]]></category>
		<category><![CDATA[colorshortcuts]]></category>
		<category><![CDATA[saturation]]></category>
		<category><![CDATA[tweener]]></category>

		<guid isPermaLink="false">http://andrewsroberson.com.br/blog/?p=30</guid>
		<description><![CDATA[Uma forma simples e rápida de baixar a saturação em movieclips ou imagens no flash é utilizar a classe caurina. Bem, caso você ainda não tenha a classe caurina, poderá estar baixando a mesma aqui. Lembre-se que estamos utilizando actionscript 2.0, portanto a classe deverá ser para actionscript 2.0. Após baixar a classe, descompacte-a e [...]]]></description>
			<content:encoded><![CDATA[<p>Uma forma simples e rápida de baixar a saturação em movieclips ou imagens no flash é utilizar a classe <a title="Tweener" href="http://code.google.com/p/tweener/">caurina</a>.<br />
Bem, caso você ainda não tenha a classe <a title="Tweener" href="http://code.google.com/p/tweener/">caurina</a>, poderá estar baixando a mesma <a title="Tweener" href="http://code.google.com/p/tweener/downloads/list">aqui</a>. Lembre-se que estamos utilizando actionscript 2.0, portanto a classe deverá ser para actionscript 2.0.</p>
<p>Após baixar a classe, descompacte-a e coloque-a dentro do diretório C:\Documents and Settings\nome-de-seu-computador\Configurações locais\Dados de aplicativos\Adobe\Flash CS3\en\Configuration\Classes (neste caso para quem utiliza Adobe Flash CS3). Fazendo desta forma não necessitaremos ter as classes no diretorio de nosso projeto, pois ela já estará visivel ao flash.</p>
<p>Após ter as classes instaladas/configuradas, criaremos o arquivo conforme a imagem abaixo.<br />
Crie 6 (seis) movieclips com cores diferentes, e instancie-os com o seguinte nome, clip1_mc, &#8230; clip6_mc.</p>
<div class="mceTemp">
<dl id="attachment_31" class="wp-caption alignnone" style="width: 477px;">
<dt class="wp-caption-dt"><a href="http://andrewsroberson.com.br/blog/wp-content/uploads/2008/10/colorshortcuts.jpg"><img class="size-full wp-image-31" title="ColorShortcuts" src="http://andrewsroberson.com.br/blog/wp-content/uploads/2008/10/colorshortcuts.jpg" alt="ColorShortcuts" width="467" height="267" /></a></dt>
</dl>
</div>
<p>Após criado e instânciados os movieclips, criaremos então o actionscript responsável por criar o efeito de saturação nos movieclips. Crie uma nova Layer, e digite o código abaixo.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* IMPORTANDO AS CLASSES CAURINA: Tweener, ColorShortcuts */</span>
<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">properties</span>.<span style="color: #006600;">ColorShortcuts</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/* INICIANDO A CLASSE ColorShortcuts */</span>
ColorShortcuts.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/* CRIAMOS UM LOOP PARA SETAR A SATURACAO
 * EM TODOS OS CLIPS QUE ESTAO NO PALCO
 */</span>
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i=<span style="color: #cc66cc;">1</span>; i<span style="color: #66cc66;">&amp;</span>lt;=<span style="color: #cc66cc;">6</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/* CLIPS RECEBEM A SATURACAO */</span>
	Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'clip'</span>+i+<span style="color: #ff0000;">'_mc'</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#123;</span>_saturation:<span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.3</span>, transition:<span style="color: #ff0000;">&quot;easeOutSine&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">/* EVENTOS ONROLLOVER/ONROLLOUT PARA VISUALIZAR O EFEITO NOS CLIPS  */</span>
	<span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'clip'</span>+i+<span style="color: #ff0000;">'_mc'</span><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>
		Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span>_saturation:<span style="color: #cc66cc;">1</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.3</span>, transition:<span style="color: #ff0000;">&quot;easeOutSine&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'clip'</span>+i+<span style="color: #ff0000;">'_mc'</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">onRollOut</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>
		Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span>_saturation:<span style="color: #cc66cc;">0</span>, <span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">0.3</span>, transition:<span style="color: #ff0000;">&quot;easeOutSine&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Simples não!<br />
<a title="Baixando a saturação em movieclips utilizando a classe caurina" href="http://www.andrewsroberson.com.br/labs/colorshortcuts/ColorShortcuts.html">Veja aqui o exemplo em funcionamento</a></p>
<p>Valeu!</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "colorshortcuts";
            bb_bid  = "5362";
            bb_lang = "pt-BR";
            bb_name = "custom";bb_width = "500";bb_limit = "5";
          </script>
          <script type="text/javascript" src="http://widgets.boo-box.com/javascripts/embed.js"></script>
          <!-- boo-widget end -->]]></content:encoded>
			<wfw:commentRss>http://andrewsroberson.com.br/blog/2008/10/08/baixando-a-saturacao-em-movieclips-utilizando-a-classe-caurina/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
