<?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; mysql</title>
	<atom:link href="http://andrewsroberson.com.br/blog/tag/mysql/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>Adobe Flex, apresentação</title>
		<link>http://andrewsroberson.com.br/blog/2009/04/29/adobe-flex-apresentacao/</link>
		<comments>http://andrewsroberson.com.br/blog/2009/04/29/adobe-flex-apresentacao/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 14:47:46 +0000</pubDate>
		<dc:creator>Andrews</dc:creator>
				<category><![CDATA[cursos]]></category>
		<category><![CDATA[dicas]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[adobe flex]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[apresentação]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[passo-a-passo]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[slide]]></category>
		<category><![CDATA[tecnologia]]></category>

		<guid isPermaLink="false">http://andrewsroberson.com.br/blog/?p=172</guid>
		<description><![CDATA[Fui convidado por meus colegas de classe da Uniguaçu para que ministrasse um curso de extenção sobre Adobe Flex para eles, assim mostrando os passos iniciais para se trabalhar com a ferramenta. Pois bem, aceitei e acatei a idéia. Penso que quanto mais desenvolvedores eu conseguir trazer para o mundo das RIA, certamente todos estaremos [...]]]></description>
			<content:encoded><![CDATA[<p>Fui convidado por meus colegas de classe da <a href="http://www.uniguacu.edu.br">Uniguaçu</a> para que ministrasse um curso de extenção sobre <a href="http://www.adobe.com/br/products/flex/">Adobe Flex</a> para eles, assim mostrando os passos iniciais para se trabalhar com a ferramenta.<br />
Pois bem, aceitei e acatei a idéia. Penso que quanto mais desenvolvedores eu conseguir trazer para o mundo das <a href="http://en.wikipedia.org/wiki/Rich_Internet_application">RIA</a>, certamente todos estaremos ganhando em qualidade de softwares no mercado.<br />
A partir deste curso estarei postando todo o material ao qual utilizamos em sala de aula aqui no blog, criando assim um passo-a-passo do curso, para que este também esteja disponível para a comunidade. Não sou um ninja em <a href="http://www.adobe.com/br/products/flex/">Adobe Flex</a>, mas o pouco que conheço certamente fara a diferença e ajudará os que estão começando. No curso estaremos adaptando um sistema que está desenvolvido em <a href="http://www.php.net/">php</a> e que foi utilizado somente para estudos, o qual comentarei no próximo post.<br />
Para dar início a este passo-a-passo, deixo aqui a apresentação utilizada na primeira aula, onde fala sobre <a href="http://www.adobe.com/br/products/flex/">Adobe Flex</a>, <a href="http://en.wikipedia.org/wiki/Rich_Internet_application">RIA</a>/<a href="http://www.adobe.com/products/air/">AIR</a>, plugins/ferramentas e sobre vantagens/desvantagens de se utilizar a ferramenta.<br />
Bom estudo, até a próxima.</p>
<div id="__ss_1362765" style="width: 425px; text-align: left;"><object data="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=adobe-flex-090429082018-phpapp01&amp;stripped_title=adobe-flex-1362765" type="application/x-shockwave-flash" width="425" height="355"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=adobe-flex-090429082018-phpapp01&amp;stripped_title=adobe-flex-1362765"><param name="allowfullscreen" value="true"></object></div>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "adobe flex, mysql, php, rich internet applications, adobe flash, smartphone, imac";
            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/2009/04/29/adobe-flex-apresentacao/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Populando ComboBox no Flash com PHP, MySQL e XML</title>
		<link>http://andrewsroberson.com.br/blog/2009/02/05/populando-combobox-no-flash-com-php-mysql-e-xml/</link>
		<comments>http://andrewsroberson.com.br/blog/2009/02/05/populando-combobox-no-flash-com-php-mysql-e-xml/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 15:20:04 +0000</pubDate>
		<dc:creator>Andrews</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[adobe flex]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://andrewsroberson.com.br/blog/?p=93</guid>
		<description><![CDATA[Tenho estudado muito nos últimos dias, afinal quem trabalha nesta área tem de estar em aprendizado constante. Estou iniciando meus estudos em OOP no PHP e também aprofundando meu conhecimento no Adobe Flex, e tenho progredido bastante neste período. Mas brother, vamos ao que interessa para este post, acabei escrevendo um código utilizando PHP e [...]]]></description>
			<content:encoded><![CDATA[<p>Tenho estudado muito nos últimos dias, afinal quem trabalha nesta área tem de estar em aprendizado constante. Estou iniciando meus estudos em <a href="http://en.wikipedia.org/wiki/Object-oriented_programming">OOP</a> no <a href="http://www.php.net/">PHP</a> e também aprofundando meu conhecimento no <a href="http://www.adobe.com/products/flex/">Adobe Flex</a>, e tenho progredido bastante neste período.<br />
Mas brother, vamos ao que interessa para este post, acabei escrevendo um código utilizando <a href="http://www.php.net/">PHP</a> e <a href="http://www.mysql.com/">MySQL</a>, onde o <a href="http://www.php.net/">PHP</a> gera um <a href="http://pt.wikipedia.org/wiki/XML">XML</a> através de uma consulta na tabela para alimentar um ComboBox Component no <a href="http://www.adobe.com/products/flash/">Flash</a>.<br />
Alimentar um ComboBox é simples, mas resolvi que iremos alimetar dois ComboBox, onde, um irá alimentar o outro, utilizarei os estados do <a href="http://pt.wikipedia.org/wiki/Brasil">Brasil</a> e suas cidades como exemplo.</p>
<p><strong>1ª Etapa:</strong><br />
Aqui, definiremos nossas tabelas no <a href="http://www.mysql.com/">MySQL</a>.<br />
Tabela <strong>estado</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`estado`</span> <span style="color: #FF00FF;">&#40;</span>
    <span style="color: #008000;">`est<span style="color: #008080; font-weight: bold;">_</span>codigo`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">auto_increment</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`est<span style="color: #008080; font-weight: bold;">_</span>nome`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">50</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`est<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">insert</span>  <span style="color: #990099; font-weight: bold;">into</span>
    <span style="color: #008000;">`estado`</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`est<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #000033;">,</span><span style="color: #008000;">`est<span style="color: #008080; font-weight: bold;">_</span>nome`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">values</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'Santa Catarina'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span><span style="color: #008000;">'Paraná'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span><span style="color: #008000;">'Rio Grande do Sul'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span><span style="color: #008000;">'São Paulo'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #000033;">,</span><span style="color: #008000;">'Rio de Janeiro'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p>Tabela <strong>cidade</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`cidade`</span> <span style="color: #FF00FF;">&#40;</span>
    <span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>codigo`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">auto_increment</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>est<span style="color: #008080; font-weight: bold;">_</span>codigo`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>nome`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">70</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">insert</span>  <span style="color: #990099; font-weight: bold;">into</span>
    <span style="color: #008000;">`cidade`</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #000033;">,</span><span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>est<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #000033;">,</span><span style="color: #008000;">`cid<span style="color: #008080; font-weight: bold;">_</span>nome`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">values</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'Porto União'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'Canoinhas'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'Balneário Camboriú'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'Caçador'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">5</span><span style="color: #000033;">,</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'Florianópolis'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">6</span><span style="color: #000033;">,</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span><span style="color: #008000;">'Curitiba'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">7</span><span style="color: #000033;">,</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span><span style="color: #008000;">'União da Vitória'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">8</span><span style="color: #000033;">,</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span><span style="color: #008000;">'Foz do Iguaçu'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">9</span><span style="color: #000033;">,</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span><span style="color: #008000;">'Porto Alegre'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">10</span><span style="color: #000033;">,</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span><span style="color: #008000;">'Canoas'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #000033;">,</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span><span style="color: #008000;">'Caxias do Sul'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">12</span><span style="color: #000033;">,</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span><span style="color: #008000;">'São Paulo'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">13</span><span style="color: #000033;">,</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span><span style="color: #008000;">'Campinas'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">14</span><span style="color: #000033;">,</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span><span style="color: #008000;">'Santos'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">15</span><span style="color: #000033;">,</span><span style="color: #008080;">4</span><span style="color: #000033;">,</span><span style="color: #008000;">'Ubatuba'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">16</span><span style="color: #000033;">,</span><span style="color: #008080;">5</span><span style="color: #000033;">,</span><span style="color: #008000;">'Rio de Janeiro'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">17</span><span style="color: #000033;">,</span><span style="color: #008080;">5</span><span style="color: #000033;">,</span><span style="color: #008000;">'Angra dos Reis'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
    <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">18</span><span style="color: #000033;">,</span><span style="color: #008080;">5</span><span style="color: #000033;">,</span><span style="color: #008000;">'Paraty'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p><strong>2ª Etapa:</strong><br />
Precisaremos de uma conexão com nosso banco de dados, caso ja tenha ou saiba como criar uma pode passar para a próxima etapa.<br />
Crie um novo arquivo <a href="http://www.php.net/">PHP</a> e salve-o com o nome de <strong>Conexao.php</strong> então escreveremos a classe <em>Conexao</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> Conexao <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// CONSTRUTOR</span>
	<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * FUNCTION CONEXAO
	 * @return $cnx
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> conectar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$sHost</span>      <span style="color: #339933;">=</span> <span style="color: #0000ff;">'nome-do-host'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$sDB</span>        <span style="color: #339933;">=</span> <span style="color: #0000ff;">'nome-do-db'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$sUser</span>      <span style="color: #339933;">=</span> <span style="color: #0000ff;">'nome-do-user-mysql'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$sPassword</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'senha-do-usuer'</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$cnx</span>        <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sHost</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sUser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sPassword</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sDB</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cnx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$cnx</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>3ª Etapa</strong><br />
Nesta etapa definiremos as classes que irão gerar o <a href="http://pt.wikipedia.org/wiki/XML">XML</a> para alimentar o ComboBox de estados que por sua vez irá alimentar o ComboBox de cidades.<br />
Então crie um arquivo <a href="http://www.php.net/">PHP</a> chamado <strong>Estado.php</strong> e escreva a classe abaixo.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// INFORMAMOS QUE O DOCUMENTO SERA DO TIPO XML</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: text/xml; charset=UTF-8&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// CONEXAO</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Conexao.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// CLASS ESTADO</span>
<span style="color: #000000; font-weight: bold;">class</span> Estado <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// CONSTRUTOR</span>
	<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * FUNCTION getEstado
	 * @return xml
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> getEstado<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// CONEXAO</span>
		<span style="color: #000088;">$conexao</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Conexao<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$cnx</span>     <span style="color: #339933;">=</span> <span style="color: #000088;">$conexao</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">conectar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// SELECIONA ESTADO NO DB</span>
		<span style="color: #000088;">$sSQL</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT est_codigo, est_nome FROM estado ORDER BY est_nome ASC&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$qSQL</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sSQL</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cnx</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// GERANDO XML</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;?xml version='1.0' encoding='UTF-8'?&gt; &quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;estados&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$aRow</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$qSQL</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;estado&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;codigo&gt;&lt;![CDATA[&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$aRow</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'est_codigo'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;]]&gt;&lt;/codigo&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;nome&gt;&lt;![CDATA[&quot;</span>   <span style="color: #339933;">.</span> <span style="color: #000088;">$aRow</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'est_nome'</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;]]&gt;&lt;/nome&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/estado&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/estados&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// INICIA CLASSE</span>
<span style="color: #000088;">$estado</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Estado<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$estado</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getEstado</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Salve-o, e agora iremos criar a classe que alimentará as cidades.<br />
A Classe de cidades é exibida de forma dinâmica, onde, ao selecionar o estado desejado passaremos o código dele como parametro para consultar somente as cidades que fazem referência a este estado.<br />
Crie um novo arquivo <a href="http://www.php.net/">PHP</a> e salve-o como o nome <strong>Cidade.php</strong>, e escreva a classe para as cidades.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// INFORMAMOS QUE O DOCUMENTO SERA DO TIPO XML</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-Type: text/xml; charset=UTF-8&quot;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// CONEXAO</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Conexao.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// CLASS CIDADE</span>
<span style="color: #000000; font-weight: bold;">class</span> Cidade <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// CONSTRUTOR</span>
	<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * FUNCTION getCidade
	 * @param Number codigo
	 * @return xml
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> getCidade<span style="color: #009900;">&#40;</span><span style="color: #000088;">$codigo</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                <span style="color: #666666; font-style: italic;">// CONEXAO</span>
		<span style="color: #000088;">$conexao</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Conexao<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$cnx</span>     <span style="color: #339933;">=</span> <span style="color: #000088;">$conexao</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">conectar</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$nCodigo</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$codigo</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$sSQL</span>    <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT
		                cid_codigo, cid_nome
					FROM
					    cidade
					WHERE
						cid_est_codigo = <span style="color: #006699; font-weight: bold;">$nCodigo</span>
					ORDER BY
						cid_nome ASC&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$qSQL</span>    <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sSQL</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cnx</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// GERANDO XML</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;?xml version='1.0' encoding='UTF-8' ?&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;cidades&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$aRow</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$qSQL</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;cidade&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;codigo&gt;&lt;![CDATA[&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$aRow</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cid_codigo'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;]]&gt;&lt;/codigo&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;cidade&gt;&lt;![CDATA[&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$aRow</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cid_nome'</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;]]&gt;&lt;/cidade&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/cidade&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/cidades&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * INICIAMOS A CLASSE E PASSAMOS O CODIGO DO
 * ESTADO COMO PARAMETRO PARA A CONSULTA
 */</span>
<span style="color: #000088;">$cidade</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Cidade<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$cidade</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCidade</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'codigo'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>4ª Etapa</strong><br />
Nesta quarta e última etapa, criaremos e escreveremos nosso arquivo <a href="http://www.adobe.com/products/flash/">Flash</a>.<br />
Então, crie um novo arquivo <a href="http://www.adobe.com/products/flash/">Flash</a>, e arraste dois Components <strong>ComboBox</strong> para o palco, de o nome de instância para eles de <em>estado_cbx</em> e <em>cidade_cbx</em>, também crie um campo de texto dinâmico com o nome de <em>alerta_txt</em>.<br />
Abaixo temos a imagem de como ficará os objetos no palco.<br />
<img src="http://andrewsroberson.com.br/blog/wp-content/uploads/2009/02/populando-combobox.jpg" alt="populando-combobox" title="populando-combobox" width="411" height="212" class="alignnone size-full wp-image-95" /><br />
Agora, insira uma nova Layer para que possamos escrever nosso código <a href="http://pt.wikipedia.org/wiki/ActionScript">ActionScript</a>, onde, este por sua vez será o reponsável pelo carregamento e população dos ComboBox.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">System</span>.<span style="color: #0066CC;">useCodepage</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * FUNCTION getEstado
 */</span>
getEstado = <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>
	<span style="color: #000000; font-weight: bold;">var</span> xmlEstado:<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>;
	xmlEstado.<span style="color: #0066CC;">ignoreWhite</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	xmlEstado.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Estado.php&quot;</span><span style="color: #66cc66;">&#41;</span>;
	xmlEstado.<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: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<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>
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> aDados = <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> nTotal = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">childNodes</span>.<span style="color: #0066CC;">length</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// PASSANDO DADOS DO XML PARA ARRAY</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> nTotal; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				aNode     = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
				aDados<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">data</span>:aNode.<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;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span>, label:aNode.<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;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span> <span style="color: #66cc66;">&#125;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// POPULANDO COMBOBOX COM OS DADOS DO ARRAY</span>
			estado_cbx.<span style="color: #006600;">dataProvider</span> = aDados;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">// LISTENER PARA ESTADO</span>
	<span style="color: #000000; font-weight: bold;">var</span> objEstado:<span style="color: #0066CC;">Object</span> = <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>;
	objEstado.<span style="color: #006600;">change</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>
		sEstado         = estado_cbx.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;
		nCodigo         = estado_cbx.<span style="color: #006600;">value</span>;
		alerta_txt.<span style="color: #0066CC;">text</span> = sEstado;
		getCidade<span style="color: #66cc66;">&#40;</span>nCodigo<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>;
	estado_cbx.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;change&quot;</span>, objEstado<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
getEstado<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 * FUNCTION getCidade
 * @param Number nCodigo
 */</span>
getCidade = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>nCodigo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> xmlCidade:<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>;
	xmlCidade.<span style="color: #0066CC;">ignoreWhite</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	xmlCidade.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Cidade.php?codigo=&quot;</span>+nCodigo<span style="color: #66cc66;">&#41;</span>;
	xmlCidade.<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: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<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>
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> aDados = <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> nTotal = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">childNodes</span>.<span style="color: #0066CC;">length</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// PASSANDO DADOS DO XML PARA ARRAY</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> nTotal; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				aNode     = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">firstChild</span>.<span style="color: #0066CC;">childNodes</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
				aDados<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">data</span>:aNode.<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;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span>, label:aNode.<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;">firstChild</span>.<span style="color: #0066CC;">nodeValue</span> <span style="color: #66cc66;">&#125;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// POPULANDO COMBOBOX COM DADOS DO ARRAY</span>
			cidade_cbx.<span style="color: #006600;">dataProvider</span> = aDados;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">// LISTENER PARA CIDADE</span>
	<span style="color: #000000; font-weight: bold;">var</span> objCidade:<span style="color: #0066CC;">Object</span> = <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>;
	objCidade.<span style="color: #006600;">change</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>
		sEstado = estado_cbx.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;
		sCidade = cidade_cbx.<span style="color: #006600;">selectedItem</span>.<span style="color: #006600;">label</span>;		
		alerta_txt.<span style="color: #0066CC;">text</span> = sCidade + <span style="color: #ff0000;">&quot; - &quot;</span> + sEstado;
	<span style="color: #66cc66;">&#125;</span>;
	cidade_cbx.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;change&quot;</span>, objCidade<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Agora, salve o arquivo <a href="http://www.adobe.com/products/flash/">Flash</a> com qualquer nome, compile e teste-o.<br />
Prontinho, nosso trabalho está feito, e com a certeza de que tiraremos bastante proveito dele.<br />
O post ficou grande, porém tenho a certeza de que estou progredindo em meus estudos e em meu conhecimento também, e assim espero repassar o pouco do que estou aprendendo com os demais, pois, como nossa areá vive em constante apredizado e nem todos tem a oportunidade de estar aprendendo em uma sala de aula fica ai então a pequena contribuição. <img src='http://andrewsroberson.com.br/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.andrewsroberson.com.br/labs/populando-combobox/">Clique aqui e veja como ficou nossa pequena aplicação</a></p>
<p>Macanudo, finalizo este post ao som de <a href="http://www.submarino.com.br/produto/2/1946636/chromophobia/?franq=273636">Chromophobia, Gui Boratto</a>. d(-_-)b</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "ActionScript";
            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/2009/02/05/populando-combobox-no-flash-com-php-mysql-e-xml/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Player em Flash para vídeos diretos do youtube</title>
		<link>http://andrewsroberson.com.br/blog/2008/09/03/player-em-flash-para-videos-diretos-do-youtube/</link>
		<comments>http://andrewsroberson.com.br/blog/2008/09/03/player-em-flash-para-videos-diretos-do-youtube/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 06:42:36 +0000</pubDate>
		<dc:creator>Andrews</dc:creator>
				<category><![CDATA[labs]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://andrewsroberson.com.br/blog/?p=9</guid>
		<description><![CDATA[Um de meus projetos necessitou a criação de um player de vídeos e agora estou compartilhando a idéia, ai tu me diz: ok Andrews, um player é simples de se fazer, só arrastar um componente e configurar a url do vídeo FLV! porém, o desafio era fazer um player com vídeos vindos diretos do YouTube [...]]]></description>
			<content:encoded><![CDATA[<p>Um de meus projetos necessitou a criação de um player de vídeos e agora estou compartilhando a idéia, ai tu me diz: ok Andrews, um player é simples de se fazer, só arrastar um componente e configurar a url do vídeo <a title="FLV" href="http://pt.wikipedia.org/wiki/FLV" target="_self">FLV</a>! porém, o desafio era fazer um player com vídeos vindos diretos do <a href="http://youtube.com">YouTube</a> e de forma randômica, que por sua vez a url destes vídeos estariam cadastrados em um banco de dados.</p>
<p>Então mãos a obra e vamos fazer este player,  <img src='http://andrewsroberson.com.br/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Construindo a tabela para abrigar as url&#8217;s. Usaremos o <a href="http://ja.wikipedia.org/wiki/pt:MySQL">MySQL</a> como base de dados para abrigar estas url&#8217;s.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #808000; font-style: italic;">/* CRIANDO A TABELA */</span>
<span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`videos`</span> <span style="color: #FF00FF;">&#40;</span>
          <span style="color: #008000;">`vid<span style="color: #008080; font-weight: bold;">_</span>codigo`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">10</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">auto_increment</span><span style="color: #000033;">,</span>
          <span style="color: #008000;">`vid<span style="color: #008080; font-weight: bold;">_</span>url`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">300</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
          <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`vid<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #FF00FF;">&#41;</span>
        <span style="color: #FF00FF;">&#41;</span>
&nbsp;
<span style="color: #808000; font-style: italic;">/* INSERINDO URL'S DO YOUTUBE */</span>
<span style="color: #990099; font-weight: bold;">insert</span>  <span style="color: #990099; font-weight: bold;">into</span>
  <span style="color: #008000;">`videos`</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`vid<span style="color: #008080; font-weight: bold;">_</span>codigo`</span><span style="color: #000033;">,</span> <span style="color: #008000;">`vid<span style="color: #008080; font-weight: bold;">_</span>url`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #990099; font-weight: bold;">values</span>
  <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">1</span><span style="color: #000033;">,</span><span style="color: #008000;">'http://br.youtube.com/watch?v=DJZUrTXPIBE'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #000033;">,</span><span style="color: #008000;">'http://br.youtube.com/watch?v=NfxtAcjYbX0'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">,</span>
  <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">3</span><span style="color: #000033;">,</span><span style="color: #008000;">'http://br.youtube.com/watch?v=TGBZfhLsljY'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>

<p>Criada a tabela, partiremos agora para o <a href="http://en.wikipedia.org/wiki/pt:PHP">php</a>, onde criaremos uma consulta para buscar as url&#8217;s dos vídeos nesta tabela. Também criaremos a função que faz a conversão da url do vídeo do <a href="http://youtube.com">YouTube</a>, para que tenhamos a url final/verdadeira do vídeo <a title="FLV" href="http://pt.wikipedia.org/wiki/FLV" target="_self">FLV</a>. Esta conversão se faz necessária devido a url apresentada quando estamos vendo o vídeo no <a href="http://youtube.com">YouTube</a> não ser a url final/verdadeira do vídeo <a title="FLV" href="http://pt.wikipedia.org/wiki/FLV" target="_self">FLV</a>, então se colocarmos esta url o player que criaremos não conseguirá encontrar o vídeo, caracterizando assim uma url inválida.</p>
<p>Criando a função para conexão com o banco de dados. Após escrever a função, salve-a com o nome de <strong>conexao.php</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> conexao<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$cnx</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nome-do-servidor'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nome-do-usuario'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'senha'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'nome-da-tabela'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cnx</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$cnx</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Criaremos então a função para selecionar a url na tabela, e fazer a conversão para a url final/verdadeira do vídeo <a title="FLV" href="http://pt.wikipedia.org/wiki/FLV" target="_self">FLV</a>. Após escrever a função, salve-a com o nome de <strong>video_url.php</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* INCLUINDO O ARQUIVO DE CONEXAO*/</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'conexao.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* VARIAVEL DE CONEXAO COM O DB */</span>
<span style="color: #000088;">$cnx</span> <span style="color: #339933;">=</span> conexao<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/* CONSULTA TABELA VIDEOS */</span>
<span style="color: #000088;">$SQL_video</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT vid_url FROM videos ORDER BY rand() LIMIT 1&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$q_video</span>   <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$SQL_video</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cnx</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$row_video</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$q_video</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">/* PASSANDO URL SELECIONADA PARA VARIAVEL */</span>
   <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row_video</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'vid_url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// ATIVADA (UPDATE EM 29-01-2009)</span>
   <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">/* FUNCTION CRIADA DEVIDO A MEU SERVER BLOQUEAR A FUNCTION file() ACIMA,
    * ENTAO curl FAZ O SERVICO DO file() E TRAZ A URL EXTERNA.
    *
    * EXPERIMENTE TESTAR EM SEU SERVER A LINHA ACIMA, SE FUNCIONAR
    * PODE REMOVER O BLOCO DE CODIGO ONDE UTILIZA AS curl
    */</span>
&nbsp;
   <span style="color: #666666; font-style: italic;">// DESATIVADA (UPDATE EM 29-01-2009)</span>
   <span style="color: #666666; font-style: italic;">/*$ch = curl_init();
   curl_setopt ($ch, CURLOPT_URL, $url);
   curl_setopt ($ch, CURLOPT_HEADER, 1);
   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 0);
   $data = curl_exec($ch);
   curl_close($ch);*/</span>
&nbsp;
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&amp;amp;t=[^&amp;amp;]*/&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/=/&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$t</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$t</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #000088;">$v</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$url</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #666666; font-style: italic;">// DESATIVADA (UPDATE EM 29-01-2009)</span>
      <span style="color: #666666; font-style: italic;">//$v = preg_split(&quot;/?v=/&quot;, $v);</span>
&nbsp;
      <span style="color: #000088;">$v</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;?v=&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$v</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$v</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&amp;amp;Path=http://www.youtube.com/get_video.php?video_id=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$v</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;amp;t=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$t</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;amp;.flv&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;null&quot;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">mysql_free_result</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$q_video</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ja temos a função do php que faz a ponte para trazer as url&#8217;s verdadeiras pronta. Agora partiremos para o <a href="http://pt.wikipedia.org/wiki/Adobe_Flash">flash</a>, onde faremos o player para tocar o vídeo.<br />
Crie um novo arquivo no <a href="http://pt.wikipedia.org/wiki/Adobe_Flash">flash</a>, podendo deixá-lo com os tamanhos padrões 550 x 400 pixels.<br />
Agora, renomei a Layer 1 para &#8220;player&#8221;, arraste um componente &#8220;FLVPlayback&#8221; para o palco e para o nome de instância digite &#8220;my_vid&#8221;.</p>
<p><a href="http://andrewsroberson.com.br/blog/wp-content/uploads/2008/09/screenshot-1.jpg"><img class="size-medium wp-image-15" title="Player para vídeos do YouTube" src="http://andrewsroberson.com.br/blog/wp-content/uploads/2008/09/screenshot-1-300x191.jpg" alt="Player para vídeos do YouTube" width="300" height="191" /></a></p>
<p>Agora vamos criar as action que serão responsáveis por fazer a ligação com o arquivo <a href="http://en.wikipedia.org/wiki/pt:PHP">php</a>.<br />
Crie uma nova Layer com o nome de &#8220;Action&#8221;, clique no Frame 1 e precissione a tecla F9.</p>
<p><a href="http://andrewsroberson.com.br/blog/wp-content/uploads/2008/09/screenshot-2.jpg"><img class="alignnone size-medium wp-image-18" title="Player para vídeos do YouTube" src="http://andrewsroberson.com.br/blog/wp-content/uploads/2008/09/screenshot-2-300x190.jpg" alt="" width="300" height="190" /></a></p>
<p>Agora iremos escrever o código <a href="http://www.adobe.com/br/products/flashplayer/productinfo/features/">actionscript</a> a seguir para que nosso player funcione.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// INFORMANDO AO FLASH QUE A COMUNICACAO (ARQUIVO) ESTA EM OUTRO DOMINIO</span>
<span style="color: #0066CC;">System</span>.<span style="color: #006600;">security</span>.<span style="color: #0066CC;">allowDomain</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> myvar:<span style="color: #0066CC;">LoadVars</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">LoadVars</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// CARREGANDO O ARQUIVO PHP</span>
myvar.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;video_url.php&quot;</span><span style="color: #66cc66;">&#41;</span>;
myvar.<span style="color: #0066CC;">onLoad</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>
	<span style="color: #808080; font-style: italic;">// PASSANDO A URL VERDADEIRA DO YOUTUBE PARA O PLAYER</span>
	my_vid.<span style="color: #006600;">contentPath</span> = myvar.<span style="color: #006600;">Path</span> + <span style="color: #ff0000;">&quot;&amp;t=&quot;</span> + myvar.<span style="color: #006600;">t</span> + <span style="color: #ff0000;">&quot;&amp;.flv&quot;</span>;
<span style="color: #66cc66;">&#125;</span>;</pre></div></div>

<p>Pronto! agora salve e compile seu arquivo <a href="http://pt.wikipedia.org/wiki/Adobe_Flash">flash</a>, e pode testá-lo em seu servidor.</p>
<p><a href="http://www.andrewsroberson.com.br/labs/player-video-youtube/player.html">Veja aqui o player em funcionamento</a>. Clique no botão de refresh para ver os vídeos de forma randômica.</p>
<p>Abraço. Espero que tenham aproveitado.</p>
<!-- boo-widget start -->
          <script type="text/javascript">
            bb_keywords = "youtube";
            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/09/03/player-em-flash-para-videos-diretos-do-youtube/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
