﻿<?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>Armando Leopoldo Keller &#187; flash</title>
	<atom:link href="http://armandokeller.com/blog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://armandokeller.com/blog</link>
	<description>Actionscript, AIR, Python, Engenharia Elétrica....</description>
	<lastBuildDate>Tue, 24 Jan 2012 19:26:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>BUG no flashplayer (votem para corrigirem)</title>
		<link>http://armandokeller.com/blog/2008/11/bug-no-flashplayer-votem-para-corrigirem/</link>
		<comments>http://armandokeller.com/blog/2008/11/bug-no-flashplayer-votem-para-corrigirem/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 01:23:12 +0000</pubDate>
		<dc:creator>Armando Leopoldo Keller</dc:creator>
				<category><![CDATA[Flash geral]]></category>
		<category><![CDATA[flash player]]></category>
		<category><![CDATA[BUG]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://alkeller.wordpress.com/?p=29</guid>
		<description><![CDATA[reporte de bug que impede a entrada de caracteres especiais em campos de texto quando o wmode esta transparente.]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript">
			<!-- 
				tweetmeme_url = "http://armandokeller.com/blog/2008/11/bug-no-flashplayer-votem-para-corrigirem/";
				tweetmeme_source = "tweetmeme";
				tweetmeme_style = "";
				
			//-->
			</script>
                        <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script>
			<!-- 
			var fbShare = {
				url: "http://armandokeller.com/blog/2008/11/bug-no-flashplayer-votem-para-corrigirem/",
				size: "large",
				google_analytics: "true"
			}
			//-->
			</script>
                        <script src="http://widgets.fbshare.me/files/fbshare.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript"><!-- 
		(function() {
		var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
		s.type = 'text/javascript';
		s.async = true;
		s.src = 'http://widgets.digg.com/buttons.js';
		s1.parentNode.insertBefore(s, s1);
		})();
		//-->
		</script><a class="DiggThisButton " href="http://digg.com/submit?url=http%3A%2F%2Farmandokeller.com%2Fblog%2F2008%2F11%2Fbug-no-flashplayer-votem-para-corrigirem%2F"></a></div><div class="socialize-in-button socialize-in-button-vertical"><div class="delicious-button"><div class="del-top"><span id="29">0</span>saves</div><div class="del-bot"><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">Save</a></div></div>
		<script>
			<!-- 
			function displayURL(data) { var urlinfo = data[0]; if (!urlinfo.total_posts) return;document.getElementById('29').innerHTML = urlinfo.total_posts;}
			//-->
		</script>
		<script src = "http://badges.del.icio.us/feeds/json/url/data?url=http://armandokeller.com/blog/2008/11/bug-no-flashplayer-votem-para-corrigirem/&amp;callback=displayURL"></script></div></div><p>Bom, como devem ter percebido o blog está meio abandonado já faz algum tempo, mas isso devido a falta de tempo, trabalho + faculdade = no time <img src='http://armandokeller.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  , agora nas ferias da faculdade vou ter mais tempo para escrever aqui.</p>
<p>Hoje quero pedir a ajuda de toso os desenvolvedores que estão lendo o blog, para votarem para a adobe corrigir este bug ( <span class="Apple-style-span" style="border-collapse:separate;color:#000000;font-family:'Lucida Grande';font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-indent:0;text-transform:none;white-space:pre;widows:2;word-spacing:0;"><a title="http://bugs.adobe.com/jira/browse/FP-501" href="http://bugs.adobe.com/jira/browse/FP-501" target="_blank">http://bugs.adobe.com/jira/browse/FP-501</a> ) </span>, este bug é muito incomodo para a entrada de textos em flash (formularios), quando o wmode esta transparente é impossivel digitar caracteres como &#8220;ãéíúê&#8221;&#8230; e todos os outros caracteres que precisam de duas teclas para serem inseridos como por exemplo teclados que possuem a tecla ç  conseguem inserir a mesma, ja teclados como os de notebooks que precisa digitar &#8216; + c para inserir o ç não é possivel usar ç nos campos <img src='http://armandokeller.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />    aqui tem um exemplo do bug acontecendo ( <span class="Apple-style-span" style="border-collapse:separate;color:#000000;font-family:'Lucida Grande';font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-indent:0;text-transform:none;white-space:pre;widows:2;word-spacing:0;"><a title="http://www.5etdemi.com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields/" href="http://www.5etdemi.com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields/" target="_blank">http://www.5etdemi.com/blog/archives/2005/06/firefox-wmodetransparent-is-completely-screwy-and-breaks-textfields/</a> )</span>.</p>
<p>Quem encontrar outro bug no flashplayer ( mas que tenha certeza que é no flashplayer e não no seu codigo, e nem algo que foi alterado por questoes de segurança) por favor, verifique se o bug ja foi reportado, se foi reportado, comente e vote para que ele seja corrigido (isso agiliza o processo), caso contrario reporte ele.</p>
<p>Desde ja, obrigado a todos os que votarem,  e provavelmente agora em dezembro eu volte a postar com mais frequencia.</p>
<p>Ideia dos proximos posts:  Como usar o debuger, inserir flash no flex, inserir flex no flash, performance no AS3 &#8230;.      Se  alguem  tiver mais alguma sugestão, avisa por email, ou por comentario.</p>
]]></content:encoded>
			<wfw:commentRss>http://armandokeller.com/blog/2008/11/bug-no-flashplayer-votem-para-corrigirem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSFL para ajustar posiçoes dos itens como campos de texto com pixelFonts(pixel Snapping)</title>
		<link>http://armandokeller.com/blog/2008/07/jsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping/</link>
		<comments>http://armandokeller.com/blog/2008/07/jsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 01:28:55 +0000</pubDate>
		<dc:creator>Armando Leopoldo Keller</dc:creator>
				<category><![CDATA[AS 2.0]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[Flash geral]]></category>
		<category><![CDATA[JSFL]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[pixelSnapping]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://alkeller.wordpress.com/?p=15</guid>
		<description><![CDATA[0savesSave Olá, primeiramente quero dizer que não tenho postado muita coisa no blog devido a falta de tempo, e tambem de conteudo(até se alguem tiver alguma sugestão manda por email ou coloca aqui como comentario que eu farei o possivel para falar sobre o assunto). Hoje a tarde depois de arrumar as posiçoes dezenas de [...]]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript">
			<!-- 
				tweetmeme_url = "http://armandokeller.com/blog/2008/07/jsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping/";
				tweetmeme_source = "tweetmeme";
				tweetmeme_style = "";
				
			//-->
			</script>
                        <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script>
			<!-- 
			var fbShare = {
				url: "http://armandokeller.com/blog/2008/07/jsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping/",
				size: "large",
				google_analytics: "true"
			}
			//-->
			</script>
                        <script src="http://widgets.fbshare.me/files/fbshare.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript"><!-- 
		(function() {
		var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
		s.type = 'text/javascript';
		s.async = true;
		s.src = 'http://widgets.digg.com/buttons.js';
		s1.parentNode.insertBefore(s, s1);
		})();
		//-->
		</script><a class="DiggThisButton " href="http://digg.com/submit?url=http%3A%2F%2Farmandokeller.com%2Fblog%2F2008%2F07%2Fjsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping%2F"></a></div><div class="socialize-in-button socialize-in-button-vertical"><div class="delicious-button"><div class="del-top"><span id="15">0</span>saves</div><div class="del-bot"><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">Save</a></div></div>
		<script>
			<!-- 
			function displayURL(data) { var urlinfo = data[0]; if (!urlinfo.total_posts) return;document.getElementById('15').innerHTML = urlinfo.total_posts;}
			//-->
		</script>
		<script src = "http://badges.del.icio.us/feeds/json/url/data?url=http://armandokeller.com/blog/2008/07/jsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping/&amp;callback=displayURL"></script></div></div><p>Olá, primeiramente quero dizer que não tenho postado muita coisa no blog devido a falta de tempo, e tambem de conteudo(até se alguem tiver alguma sugestão manda por email ou coloca aqui como comentario que eu farei o possivel para falar sobre o assunto).</p>
<p>Hoje a tarde depois de arrumar as posiçoes dezenas de movieClips para que não distorcessem eu pensei &#8220;por que eu estou fazendo isso? o flash poderia fazer sozinho&#8221;, então criei este JSFL que faz exatamente isto <a title="Pixel Snapping [alk].jsfl" href="http://paginas.terra.com.br/lazer/alksk8/Pixel%20Snapping%20alk.jsfl" target="_blank">(link)</a></p>
<p>OBS: se o link não funcionar copie ele e cole no navegador;</p>
<p>Como utilizar: é só executar.</p>
<p>ele pega todos os itens(movieClip,Button,Graphic,TextField..)  da timeline atual e ajusta  as posiçoes dos mesmos.</p>
<p>para aplicar isto dentro de um movieClip , abra-o e execute o comando dentro do movie;</p>
<p>pra quem não conseguiu abrir o link aqui vai o codigo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Pixel Snapping [alk].jsfl</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/*
Script criado por Armando Leopoldo Keller(http://alkeller.wordpress.com)
para instalar: só colar este arquivo em C:\Users\nome_do_usuario\AppData\Local\Adobe\Flash CS3\en\Configuration\Commands
obs: este é o caminho no windows vista
*/</span>
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> fl.<span style="color: #660066;">getDocumentDOM</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTimeline</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">layers</span>.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> layerAtual <span style="color: #339933;">=</span> fl.<span style="color: #660066;">getDocumentDOM</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTimeline</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">layers</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> j <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">;</span> j <span style="color: #339933;">&lt;</span> layerAtual.<span style="color: #660066;">frames</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">;</span> j<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> frameAtual <span style="color: #339933;">=</span> layerAtual.<span style="color: #660066;">frames</span><span style="color: #009900;">&#91;</span>j<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> k <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">;</span> k <span style="color: #339933;">&lt;</span> frameAtual.<span style="color: #660066;">elements</span>.<span style="color: #660066;">length</span> <span style="color: #339933;">;</span> k<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> elementoAtual <span style="color: #339933;">=</span> frameAtual.<span style="color: #660066;">elements</span><span style="color: #009900;">&#91;</span>k<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
elementoAtual.<span style="color: #660066;">x</span> <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>elementoAtual.<span style="color: #660066;">x</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
elementoAtual.<span style="color: #660066;">y</span> <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>elementoAtual.<span style="color: #660066;">y</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Qualquer coisa é só comentar, ou mandar email que eu respondo.</p>
]]></content:encoded>
			<wfw:commentRss>http://armandokeller.com/blog/2008/07/jsfl-para-ajustar-posicoes-dos-itens-como-campos-de-texto-com-pixelfontspixel-snapping/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Classe para utilização de SQL em AIR (Flash, Flex)</title>
		<link>http://armandokeller.com/blog/2008/04/classe-para-utilizacao-de-sql-em-air-flash-flex/</link>
		<comments>http://armandokeller.com/blog/2008/04/classe-para-utilizacao-de-sql-em-air-flash-flex/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 22:42:27 +0000</pubDate>
		<dc:creator>Armando Leopoldo Keller</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[Flash geral]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS 3]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://alkeller.wordpress.com/?p=12</guid>
		<description><![CDATA[0savesSave Neste tutorial mostrarei como utilizar uma classe que eu criei para facilitar o uso de SQL em AIR (tanto para flash quanto para flex) A classe é esta: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [...]]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript">
			<!-- 
				tweetmeme_url = "http://armandokeller.com/blog/2008/04/classe-para-utilizacao-de-sql-em-air-flash-flex/";
				tweetmeme_source = "tweetmeme";
				tweetmeme_style = "";
				
			//-->
			</script>
                        <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script>
			<!-- 
			var fbShare = {
				url: "http://armandokeller.com/blog/2008/04/classe-para-utilizacao-de-sql-em-air-flash-flex/",
				size: "large",
				google_analytics: "true"
			}
			//-->
			</script>
                        <script src="http://widgets.fbshare.me/files/fbshare.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript"><!-- 
		(function() {
		var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
		s.type = 'text/javascript';
		s.async = true;
		s.src = 'http://widgets.digg.com/buttons.js';
		s1.parentNode.insertBefore(s, s1);
		})();
		//-->
		</script><a class="DiggThisButton " href="http://digg.com/submit?url=http%3A%2F%2Farmandokeller.com%2Fblog%2F2008%2F04%2Fclasse-para-utilizacao-de-sql-em-air-flash-flex%2F"></a></div><div class="socialize-in-button socialize-in-button-vertical"><div class="delicious-button"><div class="del-top"><span id="12">0</span>saves</div><div class="del-bot"><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">Save</a></div></div>
		<script>
			<!-- 
			function displayURL(data) { var urlinfo = data[0]; if (!urlinfo.total_posts) return;document.getElementById('12').innerHTML = urlinfo.total_posts;}
			//-->
		</script>
		<script src = "http://badges.del.icio.us/feeds/json/url/data?url=http://armandokeller.com/blog/2008/04/classe-para-utilizacao-de-sql-em-air-flash-flex/&amp;callback=displayURL"></script></div></div><p>Neste tutorial mostrarei como utilizar uma classe que eu criei para facilitar o uso de SQL em AIR (tanto para flash quanto para flex)<br />
A classe é esta:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/*
################################################
#                                              #
#   Classe  : DB (com.alkeller.air.DB)         #
#   Autor   : Armando Leopoldo Keller          #
#   Versão  : 1.0                              #
#   Contato : alksk8@hotmail.com               #
#   Blog    : http://alkeller.wordpress.com    #
#   Documentaçao em breve no blog              #
#                                              #
################################################
------- Deixe os creditos na classe ----------
*/</span>
<span style="color: #9900cc; font-weight: bold;">package</span> com<span style="color: #000066; font-weight: bold;">.</span>alkeller<span style="color: #000066; font-weight: bold;">.</span>air
<span style="color: #000000;">&#123;</span>
	<span style="color: #009900; font-style: italic;">// Imports</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span>SQLResult<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span>filesystem<span style="color: #000066; font-weight: bold;">.</span>File<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span>SQLStatement<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">.</span>SQLConnection<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span>SQLEvent<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span>SQLErrorEvent<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.errors</span><span style="color: #000066; font-weight: bold;">.</span>SQLError<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #009900; font-style: italic;">// Classe;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> DB
	<span style="color: #000000;">&#123;</span>
		<span style="color: #009900; font-style: italic;">// Variaveis utilizadas;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> conectado<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> dbFile<span style="color: #000066; font-weight: bold;">:</span>File
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> conn<span style="color: #000066; font-weight: bold;">:</span>SQLConnection
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> _sqlStatement<span style="color: #000066; font-weight: bold;">:</span>SQLStatement<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> resultado<span style="color: #000066; font-weight: bold;">:</span>SQLResult<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> retornoString<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">private</span> static <span style="color: #6699cc; font-weight: bold;">var</span> retornoObjeto<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">// Funçao Inicia :utilizada para conectar com o banco de dados;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> Inicia<span style="color: #000000;">&#40;</span>_nome<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span>
		<span style="color: #000000;">&#123;</span>
			conn = <span style="color: #0033ff; font-weight: bold;">new</span> SQLConnection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			dbFile = File<span style="color: #000066; font-weight: bold;">.</span>applicationStorageDirectory<span style="color: #000066; font-weight: bold;">.</span>resolvePath<span style="color: #000000;">&#40;</span><span style="color: #004993;">String</span><span style="color: #000000;">&#40;</span>_nome<span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;.db&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">try</span>
			<span style="color: #000000;">&#123;</span>
				conn<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">open</span><span style="color: #000000;">&#40;</span>dbFile<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				conectado = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Conectado com &quot;</span><span style="color: #000066; font-weight: bold;">+</span>_nome<span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;.db&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				retornoString = <span style="color: #990000;">&quot;Conectado com &quot;</span><span style="color: #000066; font-weight: bold;">+</span>_nome<span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;.db&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">:</span>SQLError<span style="color: #000000;">&#41;</span> 
			<span style="color: #000000;">&#123;</span>
				conectado = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
				retornoString = <span style="color: #990000;">&quot;Falha ao conectar: &quot;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;<span style="">\n</span>Detalhes: &quot;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span>details<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> retornoString<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #009900; font-style: italic;">// Funçao executeQuery: Utilizada para executar um comando SQL(verificar quais são aceitos pelo AIR);</span>
		<span style="color: #009900; font-style: italic;">// Retorno: SQLResult --&gt; http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/data/SQLResult.html</span>
		<span style="color: #009900; font-style: italic;">// ou  String de erro;</span>
		<span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> executeQuery<span style="color: #000000;">&#40;</span>_sql<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>conectado == <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span>
			<span style="color: #000000;">&#123;</span>
				_sqlStatement = <span style="color: #0033ff; font-weight: bold;">new</span> SQLStatement<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				_sqlStatement<span style="color: #000066; font-weight: bold;">.</span>sqlConnection = conn<span style="color: #000066; font-weight: bold;">;</span>
				_sqlStatement<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = _sql<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #0033ff; font-weight: bold;">try</span>
				<span style="color: #000000;">&#123;</span>
					_sqlStatement<span style="color: #000066; font-weight: bold;">.</span>execute<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					resultado = _sqlStatement<span style="color: #000066; font-weight: bold;">.</span>getResult<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					retornoObjeto = resultado<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">:</span>SQLError<span style="color: #000000;">&#41;</span>
				<span style="color: #000000;">&#123;</span>
					retornoString = <span style="color: #990000;">&quot;Falha ao executar(&quot;</span><span style="color: #000066; font-weight: bold;">+</span>_sql<span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;): &quot;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">message</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;<span style="">\n</span>Detalhes: &quot;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #004993;">error</span><span style="color: #000066; font-weight: bold;">.</span>details<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0033ff; font-weight: bold;">return</span> retornoObjeto<span style="color: #000066; font-weight: bold;">?</span>retornoObjeto<span style="color: #000066; font-weight: bold;">:</span>retornoString<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
			<span style="color: #0033ff; font-weight: bold;">else</span>
			<span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #990000;">&quot;Não conectado!&quot;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Classe para download: http://paginas.terra.com.br/lazer/alksk8/DB.as</p>
<p>Como utilizar:<br />
1 &#8211; Importe a classe:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// OBS: Aqui é bom verificar se a classe esta no local certo com/alkeller/air/</span>
<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>alkeller<span style="color: #000066; font-weight: bold;">.</span>air<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #009900; font-style: italic;">// ou</span>
<span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>alkeller<span style="color: #000066; font-weight: bold;">.</span>air<span style="color: #000066; font-weight: bold;">.</span>DB<span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>2 &#8211; Inicie o banco:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">DB<span style="color: #000066; font-weight: bold;">.</span>Inicia<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;teste&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// sendo que teste é o nome do banco</span></pre></td></tr></table></div>

<p>3 &#8211; Se as tabelas não existirem, crie elas:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">DB<span style="color: #000066; font-weight: bold;">.</span>executeQuery<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;CREATE TABLE IF NOT EXISTS testando (id INTEGER PRIMARY KEY AUTOINCREMENT,nome TEXT,sobrenome TEXT)&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>4.1 &#8211; Execute as Querys que desejar, por exemplo inserir alguns dados:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">DB<span style="color: #000066; font-weight: bold;">.</span>executeQuery<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;INSERT INTO testando (id,nome,sobrenome) VALUES (null,'ARMANDO LEOPOLDO','KELLER')&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>4.2 &#8211; Exemplo de como buscar dados:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> obj<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span> = DB<span style="color: #000066; font-weight: bold;">.</span>executeQuery<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;SELECT * FROM testando&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">data</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;linha: &quot;</span><span style="color: #000066; font-weight: bold;">+</span>i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">for</span><span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span> <span style="color: #0033ff; font-weight: bold;">in</span> obj<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>j<span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;: &quot;</span><span style="color: #000066; font-weight: bold;">+</span>obj<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Aproveitem a classe <img src='http://armandokeller.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Em breve colocarei aqui este tutorial em video.</p>
]]></content:encoded>
			<wfw:commentRss>http://armandokeller.com/blog/2008/04/classe-para-utilizacao-de-sql-em-air-flash-flex/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>NativeMenu em AIR (flash)</title>
		<link>http://armandokeller.com/blog/2008/03/nativemenu-em-air-flash/</link>
		<comments>http://armandokeller.com/blog/2008/03/nativemenu-em-air-flash/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 21:04:42 +0000</pubDate>
		<dc:creator>Armando Leopoldo Keller</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[Flash geral]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Apollo]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Menu]]></category>
		<category><![CDATA[NativeMenu]]></category>
		<category><![CDATA[NativeMenuItem]]></category>

		<guid isPermaLink="false">http://alkeller.wordpress.com/?p=11</guid>
		<description><![CDATA[0savesSave Olá, segue abaixo um exemplo comentado de como utilizar menus(como os da maioria dos softwares) em AIR, é um exemplo básico baseado em tutoriais da Adobe. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [...]]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript">
			<!-- 
				tweetmeme_url = "http://armandokeller.com/blog/2008/03/nativemenu-em-air-flash/";
				tweetmeme_source = "tweetmeme";
				tweetmeme_style = "";
				
			//-->
			</script>
                        <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script>
			<!-- 
			var fbShare = {
				url: "http://armandokeller.com/blog/2008/03/nativemenu-em-air-flash/",
				size: "large",
				google_analytics: "true"
			}
			//-->
			</script>
                        <script src="http://widgets.fbshare.me/files/fbshare.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript"><!-- 
		(function() {
		var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
		s.type = 'text/javascript';
		s.async = true;
		s.src = 'http://widgets.digg.com/buttons.js';
		s1.parentNode.insertBefore(s, s1);
		})();
		//-->
		</script><a class="DiggThisButton " href="http://digg.com/submit?url=http%3A%2F%2Farmandokeller.com%2Fblog%2F2008%2F03%2Fnativemenu-em-air-flash%2F"></a></div><div class="socialize-in-button socialize-in-button-vertical"><div class="delicious-button"><div class="del-top"><span id="11">0</span>saves</div><div class="del-bot"><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">Save</a></div></div>
		<script>
			<!-- 
			function displayURL(data) { var urlinfo = data[0]; if (!urlinfo.total_posts) return;document.getElementById('11').innerHTML = urlinfo.total_posts;}
			//-->
		</script>
		<script src = "http://badges.del.icio.us/feeds/json/url/data?url=http://armandokeller.com/blog/2008/03/nativemenu-em-air-flash/&amp;callback=displayURL"></script></div></div><p>Olá, segue abaixo um exemplo comentado de como utilizar menus(como os da maioria dos softwares) em AIR, é um exemplo básico baseado em tutoriais da Adobe.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #3f5fbf;">/*
Primeiro crie um arquivo novo(air)
crie um campo de texto com o tamanho que desejar
instancie o campo de texto como &quot;texto&quot; (sem as aspas)
cole o codigo a seguir no primeiro frame
*/</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// importa	as classes necessarias</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span>NativeMenu<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span>NativeMenuItem<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span>NativeWindow<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> flash<span style="color: #000066; font-weight: bold;">.</span>desktop<span style="color: #000066; font-weight: bold;">.</span>NativeApplication<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">//declara os 2 items do menu</span>
<span style="color: #6699cc; font-weight: bold;">var</span> Menu01<span style="color: #000066; font-weight: bold;">:</span>NativeMenuItem<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> Menu02<span style="color: #000066; font-weight: bold;">:</span>NativeMenuItem<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>NativeWindow<span style="color: #000066; font-weight: bold;">.</span>supportsMenu<span style="color: #000000;">&#41;</span><span style="color: #009900; font-style: italic;">// Se o sistema operacional for windows</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span>menu = <span style="color: #0033ff; font-weight: bold;">new</span> NativeMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//cria o menu</span>
	<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span>menu<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">SELECT</span><span style="color: #000066; font-weight: bold;">,</span> selecionouUmItem<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona um evento de seleção no menu</span>
	Menu01 = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span>menu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Primeiro item&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o primeiro item no menu</span>
	Menu01<span style="color: #000066; font-weight: bold;">.</span>submenu = criaSubMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// adiciona o submenu(que vai ser criado logo abaixo) ao primeiro item</span>
	Menu02 = <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span>nativeWindow<span style="color: #000066; font-weight: bold;">.</span>menu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Segundo item&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o segundo item no menu</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>NativeApplication<span style="color: #000066; font-weight: bold;">.</span>supportsMenu<span style="color: #000000;">&#41;</span><span style="color: #009900; font-style: italic;">// se o sistema operacionall for mac</span>
<span style="color: #000000;">&#123;</span>
	Menu01 = NativeApplication<span style="color: #000066; font-weight: bold;">.</span>nativeApplication<span style="color: #000066; font-weight: bold;">.</span>menu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Primeiro item&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o primeiro item no menu</span>
	NativeApplication<span style="color: #000066; font-weight: bold;">.</span>nativeApplication<span style="color: #000066; font-weight: bold;">.</span>menu<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">SELECT</span><span style="color: #000066; font-weight: bold;">,</span> selecionouUmItem<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona um evento de seleção no menu</span>
	Menu01<span style="color: #000066; font-weight: bold;">.</span>submenu = criaSubMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// adiciona o submenu(que vai ser criado logo abaixo) ao primeiro item</span>
	Menu02 = NativeApplication<span style="color: #000066; font-weight: bold;">.</span>nativeApplication<span style="color: #000066; font-weight: bold;">.</span>menu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Segundo item&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o segundo item no menu</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> criaSubMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>NativeMenu
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> tmpMenu<span style="color: #000066; font-weight: bold;">:</span>NativeMenu = <span style="color: #0033ff; font-weight: bold;">new</span> NativeMenu<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// cria o submenu do primeiro item</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> MenuNovo<span style="color: #000066; font-weight: bold;">:</span>NativeMenuItem = tmpMenu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Novo&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o item &quot;Novo&quot; ao submenu</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> MenuSalva<span style="color: #000066; font-weight: bold;">:</span>NativeMenuItem = tmpMenu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Salva&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o item &quot;Salva&quot; ao submenu</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> MenuSair<span style="color: #000066; font-weight: bold;">:</span>NativeMenuItem = tmpMenu<span style="color: #000066; font-weight: bold;">.</span>addItem<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> NativeMenuItem<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Sair&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><span style="color: #009900; font-style: italic;">//adiciona o item &quot;Sair&quot; ao submenu</span>
	<span style="color: #0033ff; font-weight: bold;">return</span> tmpMenu<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> selecionouUmItem<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	texto<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">.</span>label <span style="color: #009900; font-style: italic;">// escreve o nome do item selecionado no campo de texto</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Qualquer duvida é só postar que eu respondo.</p>
<p>Assim que sobrar algum tempo por aqui eu postarei um tutorial (bem detalhado) e com os exemplos, de como utilizar um banco de dados local com o AIR.</p>
]]></content:encoded>
			<wfw:commentRss>http://armandokeller.com/blog/2008/03/nativemenu-em-air-flash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Alguma sugestão para mudar o editor AS do flash?</title>
		<link>http://armandokeller.com/blog/2008/02/alguma-sugestao-para-mudar-o-editor-as-do-flash/</link>
		<comments>http://armandokeller.com/blog/2008/02/alguma-sugestao-para-mudar-o-editor-as-do-flash/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 12:47:13 +0000</pubDate>
		<dc:creator>Armando Leopoldo Keller</dc:creator>
				<category><![CDATA[Flash geral]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[lee brimelow]]></category>

		<guid isPermaLink="false">http://alkeller.wordpress.com/?p=9</guid>
		<description><![CDATA[0savesSave Opa, essa semana eu estava lendo o the flash blog como de costume, e achei um post interessante com o titulo &#8220;Help me improve the flash code editor!&#8221; (The flash blog &#8211; Lee Brimelow) , aqui esta o link: http://theflashblog.com/?p=329 , espero que seja util.]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript">
			<!-- 
				tweetmeme_url = "http://armandokeller.com/blog/2008/02/alguma-sugestao-para-mudar-o-editor-as-do-flash/";
				tweetmeme_source = "tweetmeme";
				tweetmeme_style = "";
				
			//-->
			</script>
                        <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script>
			<!-- 
			var fbShare = {
				url: "http://armandokeller.com/blog/2008/02/alguma-sugestao-para-mudar-o-editor-as-do-flash/",
				size: "large",
				google_analytics: "true"
			}
			//-->
			</script>
                        <script src="http://widgets.fbshare.me/files/fbshare.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript"><!-- 
		(function() {
		var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
		s.type = 'text/javascript';
		s.async = true;
		s.src = 'http://widgets.digg.com/buttons.js';
		s1.parentNode.insertBefore(s, s1);
		})();
		//-->
		</script><a class="DiggThisButton " href="http://digg.com/submit?url=http%3A%2F%2Farmandokeller.com%2Fblog%2F2008%2F02%2Falguma-sugestao-para-mudar-o-editor-as-do-flash%2F"></a></div><div class="socialize-in-button socialize-in-button-vertical"><div class="delicious-button"><div class="del-top"><span id="9">0</span>saves</div><div class="del-bot"><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">Save</a></div></div>
		<script>
			<!-- 
			function displayURL(data) { var urlinfo = data[0]; if (!urlinfo.total_posts) return;document.getElementById('9').innerHTML = urlinfo.total_posts;}
			//-->
		</script>
		<script src = "http://badges.del.icio.us/feeds/json/url/data?url=http://armandokeller.com/blog/2008/02/alguma-sugestao-para-mudar-o-editor-as-do-flash/&amp;callback=displayURL"></script></div></div><p>Opa, essa semana eu estava lendo o <a href="http://www.theflashblog.com" title="The flash blog" target="_blank">the flash blog</a> como de costume, e achei um post interessante com o titulo &#8220;Help me improve the flash code editor!&#8221; (The flash blog &#8211; Lee Brimelow) , aqui esta o link: <a href="http://theflashblog.com/?p=329" title="http://theflashblog.com/?p=329" target="_blank">http://theflashblog.com/?p=329</a>  , espero que seja util.</p>
]]></content:encoded>
			<wfw:commentRss>http://armandokeller.com/blog/2008/02/alguma-sugestao-para-mudar-o-editor-as-do-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AMFPHPconn Classe de conexão com AMFPHP</title>
		<link>http://armandokeller.com/blog/2007/12/amfphpconn-classe-de-conexao-com-amfphp/</link>
		<comments>http://armandokeller.com/blog/2007/12/amfphpconn-classe-de-conexao-com-amfphp/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 17:04:59 +0000</pubDate>
		<dc:creator>Armando Leopoldo Keller</dc:creator>
				<category><![CDATA[AMFPHP]]></category>
		<category><![CDATA[AS 2.0]]></category>
		<category><![CDATA[Actionscript 2]]></category>
		<category><![CDATA[AMFPHPconn]]></category>
		<category><![CDATA[classe]]></category>
		<category><![CDATA[conexao]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://alkeller.wordpress.com/2007/12/28/amfphpconn-classe-de-conexao-com-amfphp/</guid>
		<description><![CDATA[Oi, AMFPHPconn é uma classe desenvolvida por mim para facilitar a conexão com o AMFPHP segue abaixo a classe:
// AMFPHPconn.as
import mx.remoting.Service;
import mx.services.Log;
class AMFPHPconn {
public var gateway:String;
public var log:Log;
public var servico:String;
public var Servico:Service;
public function AMFPHPconn (_gateway, _servico, _log) {
this.gateway = _gateway;
this.servico = _servico;
this.log = _log;
this.Servico = new Service(this.gateway, this.log, this.servico, null, null);
}
}

Para utilizar essa classe é só colocar o arquivo AMFPHPconn.as na mesma pasta do SWF.

um exemplo de como utilizar:

// importador.as
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.RecordSet;

// no flash:

#include "importador.as"
var conn:AMFPHPconn = new AMFPHPconn("http://localhost/amfphp/gateway.php","Login");
// é opcional colocar log
//com log ficaria:
//var conn:AMFPHPconn = new AMFPHPconn("http://localhost/amfphp/gateway.php","Login",new log());
var pc_loga:PendingCall = conn.Servico.loga("armando","keller");
pc_loga.responder = new RelayResponder(this,"rpc_loga",null);
function rpc_loga(re:ResultEvent){
trace("retornou "+re.result);
}]]></description>
			<content:encoded><![CDATA[<div class="socialize-in-content" style="float:left;"><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript">
			<!-- 
				tweetmeme_url = "http://armandokeller.com/blog/2007/12/amfphpconn-classe-de-conexao-com-amfphp/";
				tweetmeme_source = "tweetmeme";
				tweetmeme_style = "";
				
			//-->
			</script>
                        <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script>
			<!-- 
			var fbShare = {
				url: "http://armandokeller.com/blog/2007/12/amfphpconn-classe-de-conexao-com-amfphp/",
				size: "large",
				google_analytics: "true"
			}
			//-->
			</script>
                        <script src="http://widgets.fbshare.me/files/fbshare.js"></script></div><div class="socialize-in-button socialize-in-button-vertical"><script type="text/javascript"><!-- 
		(function() {
		var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
		s.type = 'text/javascript';
		s.async = true;
		s.src = 'http://widgets.digg.com/buttons.js';
		s1.parentNode.insertBefore(s, s1);
		})();
		//-->
		</script><a class="DiggThisButton " href="http://digg.com/submit?url=http%3A%2F%2Farmandokeller.com%2Fblog%2F2007%2F12%2Famfphpconn-classe-de-conexao-com-amfphp%2F"></a></div><div class="socialize-in-button socialize-in-button-vertical"><div class="delicious-button"><div class="del-top"><span id="5">0</span>saves</div><div class="del-bot"><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;">Save</a></div></div>
		<script>
			<!-- 
			function displayURL(data) { var urlinfo = data[0]; if (!urlinfo.total_posts) return;document.getElementById('5').innerHTML = urlinfo.total_posts;}
			//-->
		</script>
		<script src = "http://badges.del.icio.us/feeds/json/url/data?url=http://armandokeller.com/blog/2007/12/amfphpconn-classe-de-conexao-com-amfphp/&amp;callback=displayURL"></script></div></div><p>Oi, AMFPHPconn é uma classe desenvolvida por mim para facilitar a conexão com o <a href="http://www.amfphp.org/" title="AMFPHP site oficial" target="_blank">AMFPHP</a> segue abaixo a classe:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">//  AMFPHPconn.as</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>remoting<span style="color: #000066; font-weight: bold;">.</span>Service<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>services<span style="color: #000066; font-weight: bold;">.</span>Log<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #9900cc; font-weight: bold;">class</span> AMFPHPconn
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> gateway<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">log</span><span style="color: #000066; font-weight: bold;">:</span>Log<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> servico<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> Servico<span style="color: #000066; font-weight: bold;">:</span>Service<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> AMFPHPconn <span style="color: #000000;">&#40;</span>_gateway<span style="color: #000066; font-weight: bold;">,</span> _servico<span style="color: #000066; font-weight: bold;">,</span> _log<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>gateway = _gateway<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>servico = _servico<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">log</span> = _log<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>Servico = <span style="color: #0033ff; font-weight: bold;">new</span> Service<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>gateway<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">log</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>servico<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>Para utilizar essa classe é só colocar o arquivo AMFPHPconn.as  na mesma pasta do SWF.</p>
<p>um exemplo de  como utilizar:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #009900; font-style: italic;">// importador.as</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>remoting<span style="color: #000066; font-weight: bold;">.</span>Service<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>services<span style="color: #000066; font-weight: bold;">.</span>Log<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>RelayResponder<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>FaultEvent<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>rpc<span style="color: #000066; font-weight: bold;">.</span>ResultEvent<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>remoting<span style="color: #000066; font-weight: bold;">.</span>PendingCall<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>remoting<span style="color: #000066; font-weight: bold;">.</span>RecordSet<span style="color: #000066; font-weight: bold;">;</span></pre></td></tr></table></div>

<p>// no flash:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="actionscript3" style="font-family:monospace;">#include <span style="color: #990000;">&quot;importador.as&quot;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> conn<span style="color: #000066; font-weight: bold;">:</span>AMFPHPconn = <span style="color: #0033ff; font-weight: bold;">new</span> AMFPHPconn<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;http://localhost/amfphp/gateway.php&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;Login&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #009900; font-style: italic;">// é opcional colocar log</span>
<span style="color: #009900; font-style: italic;">//com log ficaria:</span>
<span style="color: #009900; font-style: italic;">//var conn:AMFPHPconn = new AMFPHPconn(&quot;http://localhost/amfphp/gateway.php&quot;,&quot;Login&quot;,new log());</span>
<span style="color: #6699cc; font-weight: bold;">var</span> pc_loga<span style="color: #000066; font-weight: bold;">:</span>PendingCall = conn<span style="color: #000066; font-weight: bold;">.</span>Servico<span style="color: #000066; font-weight: bold;">.</span>loga<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;armando&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;keller&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
pc_loga<span style="color: #000066; font-weight: bold;">.</span>responder = <span style="color: #0033ff; font-weight: bold;">new</span> RelayResponder<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #990000;">&quot;rpc_loga&quot;</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #339966; font-weight: bold;">function</span> rpc_loga<span style="color: #000000;">&#40;</span>re<span style="color: #000066; font-weight: bold;">:</span>ResultEvent<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;retornou &quot;</span><span style="color: #000066; font-weight: bold;">+</span>re<span style="color: #000066; font-weight: bold;">.</span>result<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://armandokeller.com/blog/2007/12/amfphpconn-classe-de-conexao-com-amfphp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

