<?xml version="1.0" encoding="ISO-8859-1"?>
<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>Gabriela Trindade Perry: HCI, Design Cognition, Flex &#187; Flash</title>
	<atom:link href="http://www.gabriela.trindade.nom.br/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gabriela.trindade.nom.br</link>
	<description></description>
	<lastBuildDate>Sun, 09 Jan 2011 15:28:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Iterators e Collections: como eu uso</title>
		<link>http://www.gabriela.trindade.nom.br/2009/10/iterators-and-collections-how-i-use-them/</link>
		<comments>http://www.gabriela.trindade.nom.br/2009/10/iterators-and-collections-how-i-use-them/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 17:15:40 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=596</guid>
		<description><![CDATA[Normalmente, trabalhar com coleções nativas do Flex do Flex não responde às minhas necessidades&#8230; Eu costumo extender estas coleções para ter certeza que estou trabalhando com o tipo correto (meus VOs). E eu sempre preciso saber qual o &#8220;estado&#8221; da coleççao, ou seja, ter um cursor. Eu faço isso usando um Iterator. Esta app tem [...]]]></description>
			<content:encoded><![CDATA[<p>Normalmente, trabalhar com coleções nativas do Flex do Flex não responde às minhas necessidades&#8230; Eu costumo extender estas coleções para ter certeza que estou trabalhando com o tipo correto (meus VOs). E eu sempre preciso saber qual o &#8220;estado&#8221; da coleççao, ou seja, ter um cursor. Eu faço isso usando um Iterator.</p>
<p>Esta app tem uitas classes e interfaces, por isso não fica prático mostrar o código aqui, por isso dê uma olha a no código, ok?</p>
<p>Se você tiver sugestões (não dúvidas), comente.</p>
<p><a href="http://www.gabriela.trindade.nom.br/arquivos/itcoll/srcview" target="_blank">View source here.</a></p>
<p>
<object width="300" height="300">
<param name="movie" value="http://www.gabriela.trindade.nom.br/arquivos/itcoll/IteratorCollection.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="300" height="300" src="http://www.gabriela.trindade.nom.br/arquivos/itcoll/IteratorCollection.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2009/10/iterators-and-collections-how-i-use-them/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex não é para sites</title>
		<link>http://www.gabriela.trindade.nom.br/2009/09/flex-nao-e-para-sites/</link>
		<comments>http://www.gabriela.trindade.nom.br/2009/09/flex-nao-e-para-sites/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 18:12:49 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Aplicativos]]></category>
		<category><![CDATA[Design cases]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[HCI]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=573</guid>
		<description><![CDATA[O debate pegou fogo mais uma vez na FB&#8230; Foi só falar em &#8220;Flex para  website&#8221; que estamos indo para os 50 replies. O caso é que a argumentação mais eloquente foi do Beck Novaes, que, apesar de não ter participado do debate, parece ter (finalmente) colocado um ponto final nesta (aborrecida) questão. Aqui você [...]]]></description>
			<content:encoded><![CDATA[<p>O debate pegou fogo mais uma vez na FB&#8230; Foi só falar em &#8220;Flex para  website&#8221; que estamos indo para os 50 replies. O caso é que a argumentação mais eloquente foi do Beck Novaes, que, apesar de não ter participado do debate, parece ter (finalmente) colocado um ponto final nesta (aborrecida) questão.</p>
<p><embed src="http://blip.tv/play/gs05gaDhVgI" type="application/x-shockwave-flash" width="480" height="307" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p><a href="http://blog.dclick.com.br/2009/09/17/flex-nao-e-para-sites-capitulo-209843/pt/" target="_blank">Aqui você vai para o post original da DClick.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2009/09/flex-nao-e-para-sites/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Loading flash MovieClips and calling Flash function from Flex</title>
		<link>http://www.gabriela.trindade.nom.br/2009/07/loading-flash-movieclips-inside-flex/</link>
		<comments>http://www.gabriela.trindade.nom.br/2009/07/loading-flash-movieclips-inside-flex/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 15:18:42 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=517</guid>
		<description><![CDATA[Super simples. Tão simples que eu nem precisava escrever este post, de tantos exemplos que tem an web. Mas eu estão tããããão entediada hoje, que resolvi me dar uma folga. Então aí está. Aproveite :0) No zip você vai encontar os fontes do Flex e o fla com os dois MC, como mostra na imagem [...]]]></description>
			<content:encoded><![CDATA[<p>Super simples. Tão simples que eu nem precisava escrever este post, de tantos exemplos que tem an web.</p>
<p>Mas eu estão tããããão entediada hoje, que resolvi me dar uma folga. Então aí está. Aproveite :0)</p>
<p>No zip você vai encontar os fontes do Flex e o fla com os dois MC, como mostra na imagem abaixo.</p>
<p><a href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/poli1.png"><img class="alignnone size-full wp-image-518" style="margin-left: 30px; margin-right: 30px;" title="poli1" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/poli1.png" alt="poli1" width="222" height="313" /></a><a href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/poli2.png"><img class="alignnone size-full wp-image-519" style="margin-left: 30px; margin-right: 30px;" title="poli2" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/poli2.png" alt="poli2" width="130" height="217" /></a></p>
<p>As imagens mostram a biblioteca do fla</p>
<p><a href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/ascode1.png"><img class="alignnone size-full wp-image-581" title="ascode" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/ascode1.png" alt="ascode" width="436" height="236" /></a></p>
<p>E este é o script do frame 1 da timeline do fla. Não tem documetn class, mas poderia ter&#8230;</p>
<p>O código no Flex também é super simples&#8230;</p>
<p><img class="alignnone size-full wp-image-584" title="flex" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/flex1.png" alt="flex" width="299" height="295" /></p>
<p><a href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/07/ff.rar" target="_blank">Baixe os fontes aqui</a></p>
<p>PS. Esta solução não usa o método addFrameScript. Se você quer tentar usá-lo, veja <a href="http://blog.tygate.com/?p=194" target="_blank">http://blog.tygate.com/?p=194</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2009/07/loading-flash-movieclips-inside-flex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Zoom, maps and Matrix</title>
		<link>http://www.gabriela.trindade.nom.br/2009/04/zoom-maps-and-matrix/</link>
		<comments>http://www.gabriela.trindade.nom.br/2009/04/zoom-maps-and-matrix/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 17:13:50 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=298</guid>
		<description><![CDATA[This post is only in English, but, come on, you can understand it&#8230; And if you can´t,  the text is short. So, I´m posting a Flex version of this app. It´s based on Matrix operations, quick and dirty. Maybe someday I will use a tree structure to represent the relations between continents, contries, states and [...]]]></description>
			<content:encoded><![CDATA[<p>This post is only in English, but, come on, you can understand it&#8230; And if you can´t,  the text is short.</p>
<p><span id="more-298"></span>So, I´m posting a Flex version of this app. It´s based on Matrix operations, quick and dirty. Maybe someday I will use a <a href="http://code.google.com/p/as3ds/" target="_blank">tree structure</a> to represent the relations between continents, contries, states and cities but it wont be now.</p>
<p><a href="/arquivos/map/f_mapnav.html" target="_blank">The app</a> has view source, as it always does. There´s a flash version <a href="http://www.augrs.com/2009/04/23/zoom-mapas-e-matrix/" target="_blank">here</a>.</p>
<p><a href="/arquivos/map/f_mapnav.html" target="_blank"><img class="alignnone size-full wp-image-304" title="mmap" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2009/04/mmap.png" alt="mmap" width="500" height="215" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2009/04/zoom-maps-and-matrix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Animations</title>
		<link>http://www.gabriela.trindade.nom.br/2008/09/animations/</link>
		<comments>http://www.gabriela.trindade.nom.br/2008/09/animations/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 21:45:00 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=99</guid>
		<description><![CDATA[Frame by frame animations&#8230; I did those for free, can you believe it? Well, earning money was never my strong point :0P This is a print screen for the first And for the second No, I couldnt figure out how to make wordpress allow me to show swf on this page :0P]]></description>
			<content:encoded><![CDATA[<p>Frame by frame animations&#8230; I did those for free, can you believe it?</p>
<p>Well, earning money was never my strong point :0P</p>
<p><span id="more-99"></span></p>
<p>This is a print screen for the <a target="_blank" href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/09/movie_mold_new.swf">first </a><br />
<a target="_blank" href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/09/movie_mold_new.swf"><img alt="mold.jpg" id="image102" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/09/mold.jpg" /></a></p>
<p>And for the <a target="_blank" href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/09/overture.swf">second </a><br />
<a target="_blank" href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/09/overture.swf"><img alt="intro.jpg" id="image101" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/09/intro.jpg" /></a></p>
<p>No, I couldnt figure out how to make wordpress allow me to show swf on this page :0P</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2008/09/animations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bring to front, send to back</title>
		<link>http://www.gabriela.trindade.nom.br/2008/09/bring-to-front-send-to-back/</link>
		<comments>http://www.gabriela.trindade.nom.br/2008/09/bring-to-front-send-to-back/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 12:27:46 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=74</guid>
		<description><![CDATA[These are some util functions I use to order my components on screen. They&#8217;re so simple and straightforward that maybe someone else could have written it allready. If that&#8217;s the case, please warn me: I&#8217;ll post the link here. /*****************************/ [code lang="actionscript"] package com.util{ import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; public class ObjectOrdering{ public static function bringToFront(object:DisplayObject):void{ [...]]]></description>
			<content:encoded><![CDATA[<p>These are some util functions I use to order my components on screen. They&#8217;re so simple and straightforward that maybe someone else could have written it allready. If that&#8217;s the case, please warn me: I&#8217;ll post the link here.<span id="more-74"></span></p>
<p>/*****************************/</p>
<pre>[code lang="actionscript"] package com.util{
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;

public class ObjectOrdering{

public static function bringToFront(object:DisplayObject):void{
var father:DisplayObjectContainer=DisplayObjectContainer(object.parent);
var brothers:int=father.numChildren;
father.setChildIndex(object,brothers-1);
}

public static function sendToBack(object:DisplayObject):void{
var father:DisplayObjectContainer=DisplayObjectContainer(object.parent);
father.setChildIndex(object, 0);
}
}
} [/code]</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2008/09/bring-to-front-send-to-back/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MVC, flash and flex p.2</title>
		<link>http://www.gabriela.trindade.nom.br/2008/08/mvc-flash-and-flex-p2/</link>
		<comments>http://www.gabriela.trindade.nom.br/2008/08/mvc-flash-and-flex-p2/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 22:41:14 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=60</guid>
		<description><![CDATA[This is the second part of a three part series of MVC posts I intend to write. This version is more complicated than the previous, which is pretty good in my opinion. The good about it is that it implements the Observer pattern and some interfaces that tie more elegantly the triad. This is an [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second part of a three part series of MVC posts I intend to write.</p>
<p>This version is more complicated than the previous, which is pretty good in my opinion. The good about it is that it implements the Observer pattern and some interfaces that tie more elegantly the triad.</p>
<p><a target="_blank" href="http://www.moock.org/eas2/examples/eas2_mvcclock.zip">This is an AS3 version of Moock&#8217;s MVC Clock.</a></p>
<p><a target="_blank" href="http://www.gabriela.trindade.nom.br/arquivos/flex_mvc_v2/main.html">See the app here (view source enabled)</a>.</p>
<p>The flash app is coming soon (I mean, two or three days).</p>
<p>/***********************************************/</p>
<p>Essa é a segunda parte de uma série de três posts que eu pretendo escrever.</p>
<p>Esta versão é um pouco mais complicada que a primeira, que é bem boa, na minha opinião. O bom desta é que ela implementa Observer e algums interfaces, de forma que a tríade fica mais elegantemente composta.</p>
<p><a target="_blank" href="http://www.moock.org/eas2/examples/eas2_mvcclock.zip">Esta é uma versão AS3 do MVCClock do Moock.</a></p>
<p><a target="_blank" href="http://www.gabriela.trindade.nom.br/arquivos/flex_mvc_v2/main.html">Veja o app aqui (view source habilitado).</a></p>
<p>O app em flash já vai ficar pronto (dois ou três dias).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2008/08/mvc-flash-and-flex-p2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MVC, flash and flex p.1</title>
		<link>http://www.gabriela.trindade.nom.br/2008/08/mvc-flash-and-flex-p1/</link>
		<comments>http://www.gabriela.trindade.nom.br/2008/08/mvc-flash-and-flex-p1/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 19:22:13 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=58</guid>
		<description><![CDATA[Okay, this is part one of an (intended) 3 part posting. This first example shows a very simple vision of an MVC implementation with Actionscript, with flash and flex 3. The only pattern implemented here is Singleton, used to dispatch events. I was inspired on Eric Feminella&#8217;s example, which you can check out here: http://www.ericfeminella.com/blog/2006/10/08/as3-model-view-controller-implementation/ [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, this is part one of an (intended) 3 part posting. This first example shows a very simple vision of an MVC implementation with Actionscript, with flash and flex 3. The only pattern implemented here is Singleton, used to dispatch events. I was inspired on Eric Feminella&#8217;s example, which you can check out here: <a target="_blank" href="http://www.ericfeminella.com/blog/2006/10/08/as3-model-view-controller-implementation/">http://www.ericfeminella.com/blog/2006/10/08/as3-model-view-controller-implementation/</a><br />
The 2nd part will have also an Observer, just as the super elegant implementation we saw on Moock&#8217;s ES2 (best AS book ever, in my modest opinion).</p>
<p>The 3rd part will have Commands also.</p>
<p><a id="p59" onmousedown="selectLink(59);" href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/08/mvc_v1.swf">Veja o arquivo do flash</a></p>
<p><a target="_blank" href="http://www.gabriela.trindade.nom.br/arquivos/flash_mvc_as_only_singleton.rar">Download the flash files here</a>.</p>
<p><a target="_blank" href="http://www.gabriela.trindade.nom.br/arquivos/flex_mvc_as_only_singleton/main.html">See the flex app here (view source enabled)</a>.</p>
<p>/******************************************/</p>
<p>Certo, essa é a primeira parte de um post que deve 3 três partes. O primeiro exemplo mostra uma visào muito simples de uma implementação MVC, com falsh e flex. O único padrão implementado é Singleton, usado para disparar eventos. Eu me inspirei no exemplo do Eric Feminella, que pode ser visto aqui: <a target="_blank" href="http://www.ericfeminella.com/blog/2006/10/08/as3-model-view-controller-implementation/">http://www.ericfeminella.com/blog/2006/10/08/as3-model-view-controller-implementation/ </a></p>
<p>A segunda parte também vai ter um Observer, como a implementação super elegante do livro ES2 do Moock (o melhor livro de AS de todos os tempos, na minha modesta opinião).</p>
<p>A terceira parte também vai ter um Command</p>
<p><a id="p59" onmousedown="selectLink(59);" href="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/08/mvc_v1.swf">Veja o arquivo do flash</a></p>
<p><a target="_blank" href="http://www.gabriela.trindade.nom.br/arquivos/flash_mvc_as_only_singleton.rar">Baixe os arquivos do flash aqui</a>.</p>
<p><a target="_blank" href="http://www.gabriela.trindade.nom.br/arquivos/flex_mvc_as_only_singleton/main.html">Veja o app em flex aqui (view source habilitado)</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2008/08/mvc-flash-and-flex-p1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design não é bolinho&#8230;</title>
		<link>http://www.gabriela.trindade.nom.br/2008/07/design-nao-e-bolinho/</link>
		<comments>http://www.gabriela.trindade.nom.br/2008/07/design-nao-e-bolinho/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 13:27:06 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Design cases]]></category>
		<category><![CDATA[Ergonomia II]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[HCI]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=57</guid>
		<description><![CDATA[Pra quem não entendeu, &#8220;não é bolinho&#8221; significa &#8220;não é fácil&#8221;. Este desabafo tem a ver com um fato que acabou de acontecer comigo (numa manhã de terça feira chuvosa em Porto Alegre) . Estava eu trabalhando no Flex, construindo uma interface super bacana para um programa que estou fazendo. A idéia é ótima, olha [...]]]></description>
			<content:encoded><![CDATA[<p>Pra quem não entendeu, &#8220;não é bolinho&#8221; significa &#8220;não é fácil&#8221;. Este desabafo tem a ver com um fato que acabou de acontecer comigo (numa manhã de terça feira chuvosa em Porto Alegre) .</p>
<p>Estava eu trabalhando no Flex, construindo uma interface super bacana para um programa que estou fazendo. A idéia é ótima, olha só:</p>
<p><img id="image54" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/07/interface.gif" alt="interface.gif" width="400" height="295" /></p>
<p>Daí? Bala, né?</p>
<p>Pois então, imagina que esse mapa aí atrás tem um navegador, zoom e pan,  e que os balõezinhos acompanham o mapa à medida que tu interage com ele &#8211; cara! &#8211; e não aumentam de tamanho! Pois eu espremi o meu cérebro do tamanho de uma cereja e me saí com um super-método de transformação de coordenadas que não é uma gambiarra! Eu tava aqui me sentindo o máximo &#8211; tô aqui cheia de Matrix e Points e etc&#8230;</p>
<p>Bem, depois que eu finalmente consegui colocar essa coisa toda pra funcionar (tava pensando: acho que vou no cinema hoje de tarde), coloquei mais uns personagens no meu XML e&#8230;</p>
<p><img id="image55" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/07/interface1.gif" alt="interface1.gif" width="290" height="90" /></p>
<p><img id="image56" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/07/interface2.gif" alt="interface2.gif" width="246" height="123" /></p>
<p>Cinema?</p>
<p>Moral da história para programadores: UML? Não! Desenhe cada tela antes de começar. Faça cenários. Desenhe os cenários. Depois, só depois, UML. Esse erro vai me custar horas de planejamento do sistema. Só que eu não tenho tempo pra isso.</p>
<p>Moral dois (ainda para programadores): Quando vocês tiverem uma idéia bala e diferente para interfaces, mesmo que achem que saibam como implementar, dupliquem o prazo do projeto.</p>
<p>Moral três (é, ainda): Provavelmente os padrões vão salvar o meu dia (e com esperança o meu cinema, que talvez role um pouco mais tarde).<br />
Moral da história para designers: não odeiem os programadores. Eles (a gente?) não consegue prever tudo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2008/07/design-nao-e-bolinho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preloading multiple images at the same time / Carregando várias imagens ao mesmo tempo</title>
		<link>http://www.gabriela.trindade.nom.br/2008/07/preloading-multiple-images-at-the-same-time-carregando-varias-imagens-ao-mesmo-tempo/</link>
		<comments>http://www.gabriela.trindade.nom.br/2008/07/preloading-multiple-images-at-the-same-time-carregando-varias-imagens-ao-mesmo-tempo/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 18:00:42 +0000</pubDate>
		<dc:creator>gabrielaperry</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.gabriela.trindade.nom.br/?p=48</guid>
		<description><![CDATA[What if we wanted to have all of our images preloaded at the same time? And what if we wanted to display information while the loading progresses? I can&#8217;t figure out a good way of doing it on a timeline base. So Im writting this short tute: it is an excellent example of the power [...]]]></description>
			<content:encoded><![CDATA[<p>What if we wanted to have all of our images preloaded at the same time? And what if we wanted to display information while the loading progresses?</p>
<p>I can&#8217;t figure out a good way of doing it on a timeline base.</p>
<p>So Im writting this short tute: it is an excellent example of the power of object orientation.</p>
<p><span id="more-48"></span></p>
<p>Figure 1 depicts the gallery we want to build.</p>
<p>Figure 2 shows the basic preloading code.</p>
<p>Suppose youre showing images from a XML file. It&#8217;s a very common setting. This means you dont know how many images youre going to show.</p>
<p>So, whats the big deal?</p>
<p>Check out the code of Figure 2. See that we instantiated MyBar, which is a simple bar MovieClip. We add it to stage when the preloading starts, change its scaleX as the loading progresses and remove it from stage when the loading finishes. So far so good, hun?</p>
<p>So, you dont know how may pictures you have&#8230; What are you going to do about the loading bars? Are you going to instantiate and add them to stage as you read your XML? Great! Excellent idea! But, hey, youre probably inside a function, dont you? So your variables are all &#8220;locals&#8221;&#8230; How are you going to remove the loading bars?</p>
<p>Well, before someone thinks of something like &#8220;hey, what if I make an Array of loading bars&#8221;, let&#8217;s check the OO approach <img src='http://www.gabriela.trindade.nom.br/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>First, a warning for the experienced programmer: this is a novice tute. I am pretty aware of DP an it all&#8230; Im not gonna cover these issues here&#8230;</p>
<p>So, as I was saying&#8230; Imagine that, instead of having all of our code on the timeline, we are going to have objects that represent each of the images we are loading. Each one of them is responsible for its own loading, so it takes care of its bars and warnings&#8230;</p>
<p>We will only instantiate them and put them on stage.</p>
<p>This is the idea. <a href="http://www.gabriela.trindade.nom.br/arquivos/multiple_pre_loader.rar">Now you download the code and read the as files</a>. And if you figure out an elegant way of doing this on the timeline Ill writte a  tribute in your name in my MSN (hehe).</p>
<p>/*****************************************************/<br />
E se nós quiséssemos carregar todas nossas imagens ao mesmo tempo?</p>
<p>E se quiséssemos mostrar informação enquanto elas carregam?</p>
<p>Eu não consigo pensar num jeito bcana de fazer isso via timeline.</p>
<p>Por isso estou escrevendo esse pequeno tutorial: é um excelente exemplo do poder da orientação a objetos.</p>
<p>Figura 1 mostra a geleria que queremos construir.</p>
<p>Figura 2 mostra um código básico de preloading.</p>
<p>Suponha que você vai mostrar as imagens de um arquivo XML. É uma coisa muito comum. Isso significa que você não sabe quantas imagens você vai mostrar.</p>
<p>E daí, qual o problema?</p>
<p>Olhe o código da figura 2. Veja que instaciamos MyBar, que é um MovieClip simples, com uma barra. Nós colocamos ele no palco quando o carregamento começa, mudamos sua scaleX durante o progresso e removemos ele do palco quando o carregamento terminia. Até tudo bem, certo?</p>
<p>Então&#8230;  você não sabe quantas imagens vai ter&#8230; Como você vai fazer com as barras de carregamento? Você vai instaciá-las e colocá-las no aplco enquanto lê seu XML? Ótimo! Excelente idéia! mas, olha só, você provavelmente está dentro de uma função, não? Então suas variáveis são todas &#8220;locais&#8221;&#8230; Como você vai remover as barras de carregamento?</p>
<p>Bem, antes que alguém pense em algo do tipo &#8220;e se eu criasse um Array de barras de carregamento&#8221;, vamos ver a abordagem OO <img src='http://www.gabriela.trindade.nom.br/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Primeiro, um aviso aos programadores experientes: este é um tutorial para iniciantes. Eu estou bem ciente dos padrões de projeto e tals&#8230; E não vou cobrir estes assuntos aqui&#8230;</p>
<p>Então, como eu estava dizendo&#8230; Imagine que, ao invés de ter todo seu código na timeline, nós vamos ter objetos que representam cada uma das imagens que nós vamos carregar. Cada uma delas é reponsável por seu próprio carregamento, por isso cuida de suas barras e avisos&#8230;</p>
<p>Nós só vamos instaciar os objetos e colocá-los no palco.</p>
<p>Essa é a idéia. <a href="http://www.gabriela.trindade.nom.br/arquivos/multiple_pre_loader.rar">Agora você baixa o código e lê os arquivos</a>. E se você achar um jeito elegante de fazer isso na timeline eu escrevo uma homenagem a você no meu MSN (hehe).</p>
<p><img height="810" width="467" alt="gallery.png" id="image47" src="http://www.gabriela.trindade.nom.br/wp-content/uploads/2008/07/gallery.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gabriela.trindade.nom.br/2008/07/preloading-multiple-images-at-the-same-time-carregando-varias-imagens-ao-mesmo-tempo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

