<?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>Leonardo França &#187; Leonardo França</title>
	<atom:link href="http://www.leonardofranca.com/index.php/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leonardofranca.com</link>
	<description>Flash Platform, Adobe AIR, ActionScript, Flash, RIA, Flex, Flash Media Server, RED5, Flash Lite, PHP, ZendAMF, AMFPHP, Java, GraniteDS, BlazeDS</description>
	<lastBuildDate>Wed, 08 Sep 2010 06:08:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Check if your site is compatible with mobile devices in Adobe Device Central CS5</title>
		<link>http://www.leonardofranca.com/index.php/2010/09/08/check-if-your-site-is-compatible-with-mobile-devices-in-adobe-device-central-cs5/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/09/08/check-if-your-site-is-compatible-with-mobile-devices-in-adobe-device-central-cs5/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 06:08:11 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[Nintendo Wii]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=738</guid>
		<description><![CDATA[
			
				
			
		
nsurprisingly the growing use of mobile devices like smartphones, tablets, etc. With the great increase in access to 3G data network, we have a new class of users that need special attention. Did your site is compatible with mobile devices? if not, it should be because the mobile user can be just who will purchase [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F09%2F08%2Fcheck-if-your-site-is-compatible-with-mobile-devices-in-adobe-device-central-cs5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F09%2F08%2Fcheck-if-your-site-is-compatible-with-mobile-devices-in-adobe-device-central-cs5%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.adobe.com/products/creativesuite/devicecentral/?promoid=ZALP"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/09/adobe_device_central_cs5_thumb.jpg" alt="Site visto no Adobe Device Central CS5" title="adobe_device_central_cs5_thumb" width="120" height="116" class="alignleft size-full wp-image-1179" /></a>nsurprisingly the growing use of mobile devices like smartphones, tablets, etc. With the great increase in access to 3G data network, we have a new class of users that need special attention. Did your site is compatible with mobile devices? if not, it should be because the mobile user can be just who will purchase your product or service<span id="more-738"></span>.</p>
<blockquote><p>
Did your site is compatible with mobile devices? if not, it should be because the mobile user can be just who will purchase your product or service.
</p></blockquote>
<p>The major banks have already realized this and most already have a version of its Internet banking to mobile devices, including to perform operations that you normally do on the site to pay bills, view balances etc..<br />
Adobe Device Central software is a part of Adobe Creative Suite family that aims to emulate the operation of mobile devices on your desktop. It is mainly used to test the functionality of Flash Lite on smartphones. But it can also be used to test your html pages and simulate the operation of any mobile device.</p>
<p>To open a page or site in Adobe Device Central CS5, just follow these steps:</p>
<ul>
<li>After opening the program, go to &#8220;Device Profiles&#8221; and click &#8220;Browse Devices&#8221;. A list of profiles of models of smartphones, select a few for your tests (right-click and ask for the &#8220;Add to Test Devices&#8221;)</li>
<li>Should see the selected device and its technical specification. Now just go to &#8220;File-> Open File &#8230;&#8221; to open a file or &#8220;File-> Open URL &#8230;&#8221; to open a site directly. In my case, ask to open the url of my blog on Nokia 5230:<div id="attachment_1219" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/09/adobe_device_central_cs5.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/09/adobe_device_central_cs5-150x150.jpg" alt="Adobe Device Central CS5" title="adobe_device_central_cs5" width="150" height="150" class="size-thumbnail wp-image-1219" /></a><p class="wp-caption-text">Adobe Device Central CS5</p></div></li>
</ul>
<p>You also have the option to call the Adobe Device Central Adobe Dreamweaver CS5 directly by, just ask &#8220;File-> Preview in Browser-> Device Central&#8221;.<br />
On my blog, I use the plugin <a href="http://crowdfavorite.com/wordpress/plugins/wordpress-mobile-edition/">WordPress Mobile Edition</a> which formats the blog to be accessed on mobile devices.</p>
<p><strong>Adobe Device Central  is included in the following Creative Suite 5 products:</strong></p>
<ul>
<li><a href="http://www.adobe.com/products/creativesuite/design/">Adobe Creative Suite® 5 Design Premium</a></li>
<li><a href="http://www.adobe.com/products/creativesuite/designstandard/">Adobe Creative Suite 5 Design Standard</a></li>
<li><a href="http://www.adobe.com/products/creativesuite/web/">Adobe Creative Suite 5 Web Premium</a></li>
<li><a href="http://www.adobe.com/products/creativesuite/production/">Adobe Creative Suite 5 Production Premium</a></li>
<li><a href="http://www.adobe.com/products/creativesuite/mastercollection/">Adobe Creative Suite 5 Master Collection</a></li>
<li><a href="http://www.adobe.com/products/photoshop/photoshopextended/">Adobe Photoshop® CS5 Extended</a></li>
<li><a href="http://www.adobe.com/products/photoshop/photoshop/">Adobe Photoshop CS5</a></li>
<li><a href="http://www.adobe.com/products/illustrator/">Adobe Illustrator® CS5</a></li>
<li><a href="http://www.adobe.com/products/flash/">Adobe Flash® Professional CS5</a></li>
<li><a href="http://www.adobe.com/products/dreamweaver/">Adobe Dreamweaver® CS5</a></li>
<li><a href="http://www.adobe.com/products/premiere/">Adobe Premiere® Pro CS5</a></li>
<li><a href="http://www.adobe.com/products/aftereffects/">Adobe After Effects® CS5</a></li>
<li><a href="http://www.adobe.com/products/fireworks/">Adobe Fireworks® CS5</a></li>
</ul>
<p>More:<br />
<a href="http://www.adobe.com/products/creativesuite/devicecentral/?promoid=ZALP">http://www.adobe.com/products/creativesuite/devicecentral/?promoid=ZALP</a></p>
<p><strong>Recommended Books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0470584769&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321704509&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321701771&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321701801&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B328TE&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003D8XEBS&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AA6&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003D8XEHW&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/09/08/check-if-your-site-is-compatible-with-mobile-devices-in-adobe-device-central-cs5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial Adobe Flash Builder 4 Free</title>
		<link>http://www.leonardofranca.com/index.php/2010/09/06/serial-adobe-flash-builder-4-free/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/09/06/serial-adobe-flash-builder-4-free/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 04:59:36 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=724</guid>
		<description><![CDATA[
			
				
			
		
Adobe Flash Builder 4 is a development IDE for building RIA applications based on Flash Platform, it is an Eclipse-based IDE, already contains the Framework Adobe Flex 4, has advanced features to increase productivity in the development of RIA applications. What few people know is that  Adobe offers free Standard version of Flash Builder [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F09%2F06%2Fserial-adobe-flash-builder-4-free%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F09%2F06%2Fserial-adobe-flash-builder-4-free%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.adobe.com/products/flashbuilder/"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/09/box_flashbuilder4_150x150.jpg" alt="Adobe Flash Builder 4" title="box_flashbuilder4_150x150" width="150" height="150" class="alignleft size-full wp-image-1173" /></a>Adobe Flash Builder 4 is a development IDE for building RIA applications based on Flash Platform, it is an Eclipse-based IDE, already contains the Framework Adobe Flex 4, has advanced features to increase productivity in the development of RIA applications. What few people know is that <strong> Adobe offers free Standard version of Flash Builder </strong> for students, teachers, unemployed, and if you want to use to disseminate technology<span id="more-724"></span>.</p>
<blockquote><p>
What few people know is that <strong> Adobe offers free Standard version of Flash Builder </strong> for students, teachers, unemployed, and if you want to use to disseminate technology.
</p></blockquote>
<p>To purchase your copy, simply fill out the form at the following address:<br />
<a href="http://www.adobe.com/devnet/flex/free/index.html">http://www.adobe.com/devnet/flex/free/index.html</a><br />
If you wanted other tools like ColdFusion Builder, follow the link:<br />
<a href="https://freeriatools.adobe.com/">https://freeriatools.adobe.com/</a></p>
<p><strong>Adobe Flash Builder 4 Features</strong></p>
<ul>
<li>Data-centric development with Introspect Java, PHP, Adobe ColdFusion, REST, and SOAP services to display methods and properties in the new Data/Service Explorer.</li>
<li>Integration with Adobe Flash Catalyst.</li>
<li>Network Monitor (Premium edition only).</li>
<li>Command line build (Premium edition only).</li>
<li>Flex unit testing integration (Premium edition only).</li>
<li>Automatic generation of common code.</li>
<li>Code refactoring.</li>
<li>Rich visual layout.</li>
<li>Debugger improvements.</li>
<li>Custom templates in new MXML, ActionScript, and CSS files.</li>
<li>Flex Theme Browser.</li>
<li>ASDoc support.</li>
<li>Adobe Flash Professional workflow</li>
<li>Skinning and styling enhanced</li>
<li>Part of Creative Suite 5 Web Premium.</li>
</ul>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_65ff9a38-c191-4128-aae5-a171ba61d28f"  WIDTH="500px" HEIGHT="175px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=GetDisplayTemplate" id="Player_65ff9a38-c191-4128-aae5-a171ba61d28f" quality="high" bgcolor="#ffffff" name="Player_65ff9a38-c191-4128-aae5-a171ba61d28f" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="175px" width="500px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/09/06/serial-adobe-flash-builder-4-free/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Developing games for the Nintendo Wii with Adobe Flash</title>
		<link>http://www.leonardofranca.com/index.php/2010/09/02/developing-games-for-the-nintendo-wii-with-adobe-flash/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/09/02/developing-games-for-the-nintendo-wii-with-adobe-flash/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 07:34:19 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Nintendo Wii]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=667</guid>
		<description><![CDATA[
			
				
			
		
The Nintendo Wii is one of today's most popular console, with their control until then innovative for its release, became a video game "for family" and for various utilities. Today, the Nintendo Wii is used in various parts of the world not only for entertainment but also in areas such as physiotherapy for recovering patients [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F09%2F02%2Fdeveloping-games-for-the-nintendo-wii-with-adobe-flash%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F09%2F02%2Fdeveloping-games-for-the-nintendo-wii-with-adobe-flash%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.nintendo.com/wii"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/top_left_off-e1282913645251.png" alt="" title="Nintendo Wii" width="120" height="110" class="alignleft size-full wp-image-1048" /></a>The Nintendo Wii is one of today's most popular console, with their control until then innovative for its release, became a video game "for family" and for various utilities. Today, the Nintendo Wii is used in various parts of the world not only for entertainment but also in areas such as <a href="http://www.fisiogames.com.br/">physiotherapy</a> for <a href="http://francodesign.blogspot.com/2007/12/wii-fit-fisioterapeutas-utilizam-wii-na.html">recovering</a> patients <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <span id="more-667"></span></p>
<blockquote><p>
Today, the Nintendo Wii is used in various parts of the world not only for entertainment but also in areas such as <a href="http://www.fisiogames.com.br/">physiotherapy</a> for <a href="http://francodesign.blogspot.com/2007/12/wii-fit-fisioterapeutas-utilizam-wii-na.html">recovering</a> patients <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
</p></blockquote>
<p>Well, we know it is possible to develop Flash for the Nintendo Wii, but we must observe some details first. Consider the specification of the Flash Player for the Nintendo Wii contained in Adobe Device Central CS5.<br />
<div id="attachment_1067" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/espec_flash_player_wii.png"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/espec_flash_player_wii-150x150.png" alt="" title="espec_flash_player_wii" width="150" height="150" class="size-thumbnail wp-image-1067" /></a><p class="wp-caption-text">Specification Flash Player in Nintendo Wii</p></div><br />
Note that we have to work with Flash Player 7, but Nintendo's website says it <a href="http://www.nintendo.com/consumer/systems/wii/en_na/channelsInternet.jsp">can be upgraded to Flash Player 8</a>, and the application will run for the Wii browser, your browser is a version of Opera made exclusively for the Wii.<br />
<a href="http://en.wikipedia.org/wiki/Internet_Channel">Wikipedia</a> say that it updated Flash Player to Adobe Flash Lite 3.1 which corresponds to a full implementation of Adobe Flash version 8 with certain features of Flash Player 9. But i created a file Flash Player 9 with ActionScript 2.0 and it worked, Flash Player 9 with ActionScript 3.0 does not work and Flash Lite 3.1 worked. <strong>I stayed with Flash Player 9 with ActionScript 2.0 for my test. (System.capabilities.version show AFL 9,1,122,0)</strong><br />
Let's do an example first to see how is the operation of the Flash Player with the Wii Remote.</p>
<ul>
<li>Create a new file type ActionScript 2.0 and soon after, put the movie to compile in Flash Player 8 or 9. Or you can do this directly through Adobe Device Central CS5, which leaves everything configured for you, including the size ideial to run on the Wii browser.</li>
<li>The purpose of this example is to evaluate the functioning of the buttons of the Wii Remote, create a symbol of type MovieClip.</li>
<li>Enter the following code in the movieclip so that our symbol can be dragged by the Wii Remote:
<div class="igBar"><span id="lactionscript-2"><a href="#" onclick="javascript:showPlainTxt('actionscript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-2">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">onClipEvent</span><span style="color: #66cc66;">&#40;</span>mouseDown<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">startDrag</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">onClipEvent</span><span style="color: #66cc66;">&#40;</span>mouseUp<span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">stopDrag</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
</li>
</ul>
<p>From what I understand, only in mouse events we can use the Nintendo Wii was not possible to use the other buttons and directional pad.<br />
You can test the example by opening the following URL in the browser from the Wii <a href="http://www.leonardofranca.com.br/wii">http://www.leonardofranca.com.br/wii</a> or watch the video below.<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/VZo4y8zt8Yg&#038;hl=pt&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/VZo4y8zt8Yg&#038;hl=pt&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Despite the limitation of only using the mouse events, can you make very interesting applications in Flash for the Nintendo Wii. I leave a link with some games for the Nintendo Wii made in Flash. <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
<a href="http://www.eiksoft.com/wii/index.htm">http://www.eiksoft.com/wii/index.htm</a></p>
<p>More:<br />
<a href="http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/js/html/wwhelp.htm">Documentation ActionScript 2.0</a></p>
<p><strong>Recommended Books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321701801&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1449380255&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0240522079&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AJ2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003D8XEHW&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AJC&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003EGULF6&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B0009VXBAQ&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003EH0BQ4&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/09/02/developing-games-for-the-nintendo-wii-with-adobe-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lazy Loading with Adobe Flex and BlazeDS</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/31/lazy-loading-with-adobe-flex-and-blazeds/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/31/lazy-loading-with-adobe-flex-and-blazeds/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 11:05:08 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=703</guid>
		<description><![CDATA[
			
				
			
		
BlazeDS is an implementation in Java for working with the protocol AMF (Action Message Format) and facilitate communication between the swf and your server-side Java.
When you begin to use a resource unlike most people, you may find some problems difficult to solve. Flex with Java and the problem is the old Lazy Loading, which already [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F31%2Flazy-loading-with-adobe-flex-and-blazeds%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F31%2Flazy-loading-with-adobe-flex-and-blazeds%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://opensource.adobe.com/wiki/display/blazeds/Overview"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/blazeds_high_119x125.jpg" alt="" title="blazeds_high_119x125" width="119" height="125" class="alignleft size-full wp-image-1152" /></a>BlazeDS is an implementation in Java for working with the protocol AMF (Action Message Format) and facilitate communication between the swf and your server-side Java.<br />
When you begin to use a resource unlike most people, you may find some problems difficult to solve. Flex with Java and the problem is the old Lazy Loading, which already was the subject of several conversations between me and <a href="http://www.wendersonsouza.com.br">Wenderson</a><span id="more-703"></span>. I left this issue aside to focus on other things. However the Wenderson managed to find a solution, see the full article with the solution.<br />
<a href="http://translate.google.com/translate?js=y&#038;prev=_t&#038;hl=en-US&#038;ie=UTF-8&#038;layout=1&#038;eotf=1&#038;u=http://www.wendersonsouza.com.br/index.php/2010/08/30/adobe-flex-blazeds-gilead-lazyloading-resolvidolazyloading-solved&#038;sl=pt&#038;tl=en/">Adobe Flex, BlazeDS, Gilead, LazyLoading Resolvido(LazyLoading Solved)</a></p>
<p><strong>Recommended books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0470464895&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0470400749&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_65ff9a38-c191-4128-aae5-a171ba61d28f"  WIDTH="500px" HEIGHT="175px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=GetDisplayTemplate" id="Player_65ff9a38-c191-4128-aae5-a171ba61d28f" quality="high" bgcolor="#ffffff" name="Player_65ff9a38-c191-4128-aae5-a171ba61d28f" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="175px" width="500px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F65ff9a38-c191-4128-aae5-a171ba61d28f&#038;Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/31/lazy-loading-with-adobe-flex-and-blazeds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Accelerometer on Flash Lite with Nokia Platform Services</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/30/using-accelerometer-on-flash-lite-with-nokia-platform-services/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/30/using-accelerometer-on-flash-lite-with-nokia-platform-services/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 15:17:39 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=690</guid>
		<description><![CDATA[
			
				
			
		
Accelerometer is a motion sensor, one device responsible for measuring the relative positions of the axes x, y and z, ie, calculate the acceleration of the object. Today it is used for a variety of utilities such as: air bags, vibration measurement, measurement of inclination, smartphones, video games etc.

The accelerometer is used today is used [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F30%2Fusing-accelerometer-on-flash-lite-with-nokia-platform-services%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F30%2Fusing-accelerometer-on-flash-lite-with-nokia-platform-services%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/acelerometro-e1283102101239.jpeg" alt="" title="acelerometro" width="120" height="89" class="alignleft size-full wp-image-1101" />Accelerometer is a motion sensor, one device responsible for measuring the relative positions of the axes x, y and z, ie, calculate the acceleration of the object. Today it is used for a variety of utilities such as: air bags, vibration measurement, measurement of inclination, smartphones, video games etc<span id="more-690"></span>.</p>
<blockquote><p>
The accelerometer is used today is used for a variety of utilities such as: air bags, vibration measurement, measurement of inclination, smartphones, video games etc.
</p></blockquote>
<p>Flash Player 10.1 (only for mobile) and Flash Lite 4.0 have access to the device's accelerometer. I'm anxious to get their hands on a Nokia N8 to test new features <a href="http://help.adobe.com/en_US/flashlite/dev/4/index.html">Flash Lite 4.0</a>, but this hard. Meanwhile, we are developing with Flash Lite 3.0 and 3.1.<br />
Nokia has created a <a href="http://www.forum.nokia.com/Develop/Other_Technologies/Flash_lite/">library </a>especially for working with Flash Lite feature that gives access to natively are not possible as access to the accelerometer, GPS, calendar, contacts etc.</p>
<blockquote><p>
Nokia has created a <a href="http://www.forum.nokia.com/Develop/Other_Technologies/Flash_lite/">library </a>especially for working with Flash Lite feature that gives access to natively are not possible as access to the accelerometer, GPS, calendar, contacts etc.
</p></blockquote>
<p>I'll show a simple example of using the accelerometer with Flash Lite 3.0 and Nokia Platform Services.<br />
Download the <a href="http://library.forum.nokia.com/topic/Flash_Lite_Developers_Library/ActionScript_library_for_S60_Platform_Services.zip">library</a> Nokia and then save the directory under your operating system:</p>
<blockquote><p>
Nokia Platform Services only works on devices running Symbian S60 5th.
</p></blockquote>
<ul>
<li>Mac - /Users/<user name>/Library/Application/Support/Adobe/Flash CS5/en/Configuration/Classes/</li>
<li>Windows Vista - /Users/<user name>/AppData/Local/Adobe/Flash CS4/en/Configuration/Classes.</li>
<li>Windows XP - /<user name>/Local Settings/Application Data/Adobe/Flash CS5/en/Configuration/Classes/</li>
</ul>
<p>We will start our first example:</p>
<ul>
<li>Create a file of type ActionScript 2.0 and ask them to compile for Flash Lite 3.0 or 3.1. Or you can create directly from Adobe Device Central CS5.</li>
<li>Create a symbol of type MovieClip and give it the instance name of "ball_mc".</li>
<li>Create three text fields of type dynamic, therein are shown the positions x, y and z.</li>
<li>We must have a stage like this:<div id="attachment_1119" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/stage_acelerometro.png"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/stage_acelerometro-150x150.png" alt="" title="stage_acelerometro" width="150" height="150" class="size-thumbnail wp-image-1119" /></a><p class="wp-caption-text">Stage for test Accelerometer</p></div></li>
</ul>
<p>This done, let's now part of programming:<br />
We will start setting the stage for not changing the size of the application if the window is resized. The "DisableKeypadCompatibilityMode" is for use in smartphones with touch screens, if not used, the smartphone will automatically add the virtual keys corresponding to a non-touchscreen smartphone.</p>
<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-7">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">scaleMode</span> = <span style="color: #ff0000;">&quot;noScale&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">Stage</span>.<span style="color: #0066CC;">align</span> = <span style="color: #ff0000;">&quot;LT&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fscommand2<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;DisableKeypadCompatibilityMode&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">fscommand2<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;FullScreen&quot;</span>, <span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now let's import the classes made by Nokia and use the Device class and disable the autorotation of the application.</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showPlainTxt('actionscript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-8">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">nokia</span>.<span style="color: #006600;">lib</span>.<span style="color: #006600;">Service</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">nokia</span>.<span style="color: #006600;">lib</span>.<span style="color: #006600;">Device</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> deviceObject:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> Device<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">deviceObject.<span style="color: #006600;">DisableAutoRotation</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Service will use the class by passing the parameter sensor and then passing the criterion for a search the coordinates of the accelerometer.</p>
<div class="igBar"><span id="lactionscript-9"><a href="#" onclick="javascript:showPlainTxt('actionscript-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-9">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> sensors = <span style="color: #000000; font-weight: bold;">new</span> Service<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Service.Sensor&quot;</span>, <span style="color: #ff0000;">&quot;ISensor&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> inParam = <span style="color: #66cc66;">&#123;</span>SearchCriterion:<span style="color: #ff0000;">&quot;AccelerometerAxis&quot;</span><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> outParams = sensors.<span style="color: #006600;">FindSensorChannel</span><span style="color: #66cc66;">&#40;</span>inParam<span style="color: #66cc66;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Will return a series of values we use to "advise" the smartphone that our application will be updated with every change in value of the coordinates of the accelerometer through a callback method.</p>
<div class="igBar"><span id="lactionscript-10"><a href="#" onclick="javascript:showPlainTxt('actionscript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-10">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> channelInfo = outParams.<span style="color: #006600;">ReturnValue</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> channelId = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">ChannelId</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> contextType = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">ContextType</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> quantity = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">Quantity</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> channelType = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">ChannelType</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> location = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">Location</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> vendorId = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">VendorId</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> dataItemSize = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">DataItemSize</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> channelDataTypeId = channelInfo<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">ChannelDataTypeId</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> channelParams = <span style="color: #66cc66;">&#123;</span>ChannelId:channelId, ContextType:contextType, Quantity:quantity, ChannelType:channelType, Location:location, VendorId:vendorId, DataItemSize:dataItemSize, ChannelDataTypeId:channelDataTypeId<span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> inParams = <span style="color: #66cc66;">&#123;</span>ListeningType:<span style="color: #ff0000;">&quot;ChannelData&quot;</span>, ChannelInfoMap:channelParams<span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">sensors.<span style="color: #006600;">RegisterForNotification</span><span style="color: #66cc66;">&#40;</span>inParams, callBack<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> callBack<span style="color: #66cc66;">&#40;</span>transactionID:<span style="color: #0066CC;">String</span>, eventID:<span style="color: #0066CC;">String</span>, outParam:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>outParam.<span style="color: #006600;">ErrorCode</span> == <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> channelData = outParam.<span style="color: #006600;">ReturnValue</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; txtX.<span style="color: #0066CC;">text</span> = channelData.<span style="color: #006600;">XAxisData</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; txtY.<span style="color: #0066CC;">text</span> = channelData.<span style="color: #006600;">YAxisData</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; txtZ.<span style="color: #0066CC;">text</span> = channelData.<span style="color: #006600;">ZAxisData</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; xSpeed -= channelData.<span style="color: #006600;">XAxisData</span><span style="color: #66cc66;">/</span>NOISE;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; ySpeed += channelData.<span style="color: #006600;">YAxisData</span><span style="color: #66cc66;">/</span>NOISE;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Then just update the x and y coordinates with the values and xSpeed ySpeed in our MovieClip. Made available at the source code to define how far the MovieClip can walk, or only in the area of our application.<br />
<a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/acelerometro.zip"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/archive.png" alt="" title="archive" width="46" height="60" valign="absmiddle" /></a> <strong><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/acelerometro.zip">DOWNLOAD SOURCE</a></strong> </p>
<p><strong>To learn more:</strong><br />
<a href="http://www.forum.nokia.com/Develop/Other_Technologies/Flash_lite/">http://www.forum.nokia.com/Develop/Other_Technologies/Flash_lite/</a><br />
<a href="http://library.forum.nokia.com/index.jsp?topic=/Flash_Lite_Developers_Library/GUID-46EABDC1-37CB-412A-ACAD-1A1A9466BB68.html">http://library.forum.nokia.com/index.jsp?topic=/Flash_Lite_Developers_Library/GUID-46EABDC1-37CB-412A-ACAD-1A1A9466BB68.html</a></p>
<p><strong>Recommended Books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1430219041&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0470547480&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1590595580&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003BNZD5K&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_0fd01e81-20f8-4aee-a190-bf33b617fc18"  WIDTH="500px" HEIGHT="175px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F0fd01e81-20f8-4aee-a190-bf33b617fc18&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F0fd01e81-20f8-4aee-a190-bf33b617fc18&#038;Operation=GetDisplayTemplate" id="Player_0fd01e81-20f8-4aee-a190-bf33b617fc18" quality="high" bgcolor="#ffffff" name="Player_0fd01e81-20f8-4aee-a190-bf33b617fc18" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="175px" width="500px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fleonafranc-20%2F8010%2F0fd01e81-20f8-4aee-a190-bf33b617fc18&#038;Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/30/using-accelerometer-on-flash-lite-with-nokia-platform-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Motion Detection Webcam with Adobe Flash</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/27/motion-detecting-webcam-with-adobe-flash/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/27/motion-detecting-webcam-with-adobe-flash/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 10:56:16 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=654</guid>
		<description><![CDATA[
			
				
			
		
An interesting feature and that few people know the Flash Player or Adobe AIR, is that in addition to access features like the webcam user, it can also detect whether there is movement in the camera. This can be useful if you're implementing a system to stream live and want to save the bandwidth used. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F27%2Fmotion-detecting-webcam-with-adobe-flash%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F27%2Fmotion-detecting-webcam-with-adobe-flash%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/webcam-e1282877589444.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/webcam-e1282877589444.jpg" alt="" title="webcam" width="150" height="121" class="alignleft size-full wp-image-1001" /></a>An interesting feature and that few people know the Flash Player or Adobe AIR, is that in addition to access features like the webcam user, it can also detect whether there is movement in the camera. This can be useful if you're implementing a system to stream live and want to save the bandwidth used. For example, the stream will only be published if you have any camera motion<span id="more-654"></span>. </p>
<blockquote><p>
Flash Player or Adobe AIR, beyond access features such as webcam user can also detect whether there is movement in the camera.
</p></blockquote>
<p>Let's see an example using Adobe Flash Professional CS5 and Flash  Builder 4 (using the Flex framework 4).</p>
<p><strong>Adobe Flash Professional CS5</strong></p>
<ul>
<li>Create a file of type ActionScript 3.0</li>
<li>Press F11 to open the library, ask to create a new symbol type "video":<div id="attachment_1011" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/library_flash.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/library_flash-150x150.jpg" alt="" title="library_flash" width="150" height="150" class="size-thumbnail wp-image-1011" /></a><p class="wp-caption-text">Library->New Video</p></div></li>
<li>A new window appears, in the name of "cam" and leave the option "Video (ActionScript-controlled)" selected:<div id="attachment_1013" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/library_cam.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/library_cam-150x150.jpg" alt="" title="library_cam" width="150" height="150" class="size-thumbnail wp-image-1013" /></a><p class="wp-caption-text">cam</p></div></li>
<li>Drag the component you just created for the stage and the instance name of "cam", then resize to 320x240.</li>
<li>Drag a ProgressBar component's type library of the User Interface. Name the instance "pbar".</li>
<li>After that you should have something like this:<div id="attachment_1015" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/stage_cam.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/stage_cam-150x150.jpg" alt="" title="stage_cam" width="150" height="150" class="size-thumbnail wp-image-1015" /></a><p class="wp-caption-text">Stage ready to start programming</p></div></li>
</ul>
<p>We have our stage ready to start programming ActionScript 3.0. Let's start with asking the Flash Player to access the webcam and then put the image of the webcam in our component video.</p>
<div class="igBar"><span id="lactionscript3-16"><a href="#" onclick="javascript:showPlainTxt('actionscript3-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-16">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myCam = <a href="http://www.google.com/search?q=camera%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:camera.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Camera</span></a>.<span style="color: #004993;">getCamera</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">cam.<span style="color: #004993;">attachCamera</span><span style="color: #000000;">&#40;</span>myCam<span style="color: #000000;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now just to make our movie listen to the event "ActivityEvent" Webcam.</p>
<div class="igBar"><span id="lactionscript3-17"><a href="#" onclick="javascript:showPlainTxt('actionscript3-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-17">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myCam.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=activityevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:activityevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ActivityEvent</span></a>.<span style="color: #004993;">ACTIVITY</span>,handlerMotion<span style="color: #000000;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
And handlerMotion method, we implement the actions in the ProgressBar.</p>
<div class="igBar"><span id="lactionscript3-18"><a href="#" onclick="javascript:showPlainTxt('actionscript3-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-18">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339966; font-weight: bold;">function</span> handlerMotion<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=activityevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:activityevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ActivityEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>evt.<span style="color: #004993;">target</span>.<span style="color: #004993;">activityLevel</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; pbar.setProgress<span style="color: #000000;">&#40;</span>evt.<span style="color: #004993;">target</span>.<span style="color: #004993;">activityLevel</span>,<span style="color: #000000; font-weight:bold;color:#800000;">100</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>evt.<span style="color: #004993;">target</span>.<span style="color: #004993;">activityLevel</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;color:#800000;">10</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;muito quieto! =õ(&quot;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;eba! festa!!! <span style="">\\</span>o/<span style="">\\</span>O/<span style="">\\</span>o/&quot;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
See example in operation:<br />

<object width="450" height="400">
<param name="movie" value="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/motion_camera.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="450" height="400" src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/motion_camera.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p><strong>Adobe Flex 4 </strong><br />
We will now see an example using Adobe Flex, I'll grab the camera using component VideoDisplay.</p>
<ul>
<li>Create a project of type web (Flex) or Desktop (AIR).</li>
<li>Drag a component of type VideoDisplay and another type ProgressBar to the stage.</li>
<li>We have something like this:
<div class="igBar"><span id="lmxml-19"><a href="#" onclick="javascript:showPlainTxt('mxml-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MXML:</span>
<div id="mxml-19">
<div class="mxml" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span> minWidth=<span style="color: #ff0000;">&quot;450&quot;</span> minHeight=<span style="color: #ff0000;">&quot;400&quot;</span> width=<span style="color: #ff0000;">&quot;450&quot;</span> height=<span style="color: #ff0000;">&quot;400&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VideoDisplay</span> id=<span style="color: #ff0000;">&quot;cam&quot;</span> x=<span style="color: #ff0000;">&quot;48&quot;</span> y=<span style="color: #ff0000;">&quot;38&quot;</span> width=<span style="color: #ff0000;">&quot;360&quot;</span> height=<span style="color: #ff0000;">&quot;240&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ProgressBar</span> id=<span style="color: #ff0000;">&quot;pbar&quot;</span> x=<span style="color: #ff0000;">&quot;125&quot;</span> y=<span style="color: #ff0000;">&quot;297&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
</li>
</ul>
<p>Simply implement the ActionScript programming now, is very similar to the way we did in Flash. We will change little in the ActionScript 3.0 code.</p>
<div class="igBar"><span id="lactionscript3-20"><a href="#" onclick="javascript:showPlainTxt('actionscript3-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-20">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> application1_creationCompleteHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span>FlexEvent<span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; pbar.<span style="color: #004993;">mode</span> = <span style="color: #990000;">&quot;manual&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; myCam = <a href="http://www.google.com/search?q=camera%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:camera.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Camera</span></a>.<span style="color: #004993;">getCamera</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> vd<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Video</span></a> = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=video%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:video.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Video</span></a><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;color:#800000;">320</span>,<span style="color: #000000; font-weight:bold;color:#800000;">240</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; vd.<span style="color: #004993;">attachCamera</span><span style="color: #000000;">&#40;</span>myCam<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; cam.<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>vd<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; myCam.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=activityevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:activityevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ActivityEvent</span></a>.<span style="color: #004993;">ACTIVITY</span>, handlerMotion<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> handlerMotion<span style="color: #000000;">&#40;</span>evt<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=activityevent%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:activityevent.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">ActivityEvent</span></a><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>evt.<span style="color: #004993;">target</span>.<span style="color: #004993;">activityLevel</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; pbar.setProgress<span style="color: #000000;">&#40;</span>evt.<span style="color: #004993;">target</span>.<span style="color: #004993;">activityLevel</span>,<span style="color: #000000; font-weight:bold;color:#800000;">100</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>evt.<span style="color: #004993;">target</span>.<span style="color: #004993;">activityLevel</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000; font-weight:bold;color:#800000;">10</span><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; pbar.label = <span style="color: #990000;">&quot;muito quieto! =õ(&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; pbar.label = <span style="color: #990000;">&quot;eba! festa!!! <span style="">\\</span>o/<span style="">\\</span>O/<span style="">\\</span>o/&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now, we only apply the logic to be transmitted or not the stream of the webcam user.</p>
<div>
<a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/motion_camera.zip"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/archive.png" alt="" title="archive" width="46" height="60" valign="absmiddle" /></a> <strong><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/motion_camera.zip">DOWNLOAD SOURCE FLASH</a></strong>
</div>
<p><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/MotioCamera.zip"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/archive.png" alt="" title="archive" width="46" height="60" /></a> <strong><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/MotioCamera.zip">DOWNLOAD SOURCE FLEX</a></strong></p>
<p><strong>More:</strong><br />
<a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html?allClasses=1">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html?allClasses=1</a></p>
<p><strong>Recommended Books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321701801&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1449380255&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0240522079&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321660501&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<p><strong>Buy Softwares:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AJ2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003D8XEHW&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AJC&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003739DS2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/27/motion-detecting-webcam-with-adobe-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inverse Kinematics in Adobe Flash</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/25/inverse-kinematics-in-adobe-flash/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/25/inverse-kinematics-in-adobe-flash/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 11:39:36 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=645</guid>
		<description><![CDATA[
			
				
			
		
In Physics, kinematics is the branch responsible for studying the motion of bodies. Inverse Kinematics (IK) is a technique widely used in engineering, robotics and animation. It consists of the movement of an object or a set of objects in relation to other objects, using an articulated structure of bones. The bones allow the handling [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F25%2Finverse-kinematics-in-adobe-flash%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F25%2Finverse-kinematics-in-adobe-flash%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/an_ik_symbols.png"><img class="alignleft size-full wp-image-967" title="an_ik_symbols" src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/an_ik_symbols-e1282698417688.png" alt="" width="80" height="156" /></a>In Physics, kinematics is the branch responsible for studying the motion of bodies. Inverse Kinematics (IK) is a technique widely used in engineering, robotics and animation. It consists of the movement of an object or a set of objects in relation to other objects, using an articulated structure of bones. The bones allow the handling of complex and natural way possible to create character animation, such as arms, legs and facial expressions much more easily, the simplest image illustrates this is the movement of a lever<span id="more-645"></span>. Anyone who has worked with 3D modeling software such as <a href="http://www.lcg.ufrj.br/Members/yalmar/Members/yalmar/blender/tutorial2.htm">3D Studio MAX</a> already familiar with this technique. From Adobe Flash CS4, we have the opportunity to work with inverse kinematics in Flash IDE itself and a library in ActionScript 3.0.</p>
<blockquote><p>Inverse kinematics (IK) is a method of animation that consists of movement of an object or a set of objects in relation to other objects, using an articulated structure of bones. The bones allow the handling of complex and natural way possible to create character animation, such as arms, legs and facial expressions much more easily, the simplest image illustrates this is the movement of a lever.</p></blockquote>
<p>Now let's see an example using Adobe Flash Professional CS5 will be pretty simple to understand the workings of this tool.</p>
<ul>
<li>Create a new file type ActionScript 3.0</li>
<li>Create three graphic symbols in a rectangular shape so that the effect is better visualized. Let them side by side forming a row.</li>
<li>Select Bone tool<a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/bone_tool.png"><img class="alignnone size-full wp-image-976" title="bone_tool" src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/bone_tool.png" alt="" width="16" height="18" /></a></li>
<li>Click the first symbol of pure and drag until the end of it. Will be formed with a bone on its own biggest one being the base.</li>
<li> Do the same with the second symbol in order to start dragging from its own smaller bone of the first symbol.</li>
<li>Your stage should look like this:
<div id="attachment_981" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/ik_adobe_flash.jpg"><img class="size-thumbnail wp-image-981" title="ik_adobe_flash" src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/ik_adobe_flash-150x150.jpg" alt="IK Adobe Flash" width="150" height="150" /></a><p class="wp-caption-text">IK Adobe Flash</p></div></li>
<li>Note that a new layer was created with the name of armature. Select frame 20 for example, right-click on the frame and select "Insert pose". This done, move in any way the symbols on the stage. Do the same for frame 40 and 60.</li>
<li>Now test the movie "Ctrl+Enter".</li>
</ul>
<p>
<object width="450" height="400">
<param name="movie" value="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/ik_sample.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="450" height="400" src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/ik_sample.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>

<p><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/ik_sample.zip"><strong>DOWNLOAD SOURCE</strong></a></p>
<p><strong>More:</strong><br />
<a href="http://help.adobe.com/en_US/flash/cs/using/WS2756549E-1394-424a-B00E-357A1EAED5D8.html">http://help.adobe.com/en_US/flash/cs/using/WS2756549E-1394-424a-B00E-357A1EAED5D8.html</a></p>
<p><strong>Recommended Books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321701801&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1449380255&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0240522079&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
<p><strong>Buy Softwares:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AJ2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003D8XEHW&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003B32AJC&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/25/inverse-kinematics-in-adobe-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Dynamic Streaming with Flash Media Server 3.5</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/23/using-dynamic-streaming-with-flash-media-server-3-5/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/23/using-dynamic-streaming-with-flash-media-server-3-5/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:14:42 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=615</guid>
		<description><![CDATA[
			
				
			
		
Adobe Flash has revolutionized the distribution of video content on the web, we have the Adobe Flash Media Server that helped with this by giving the possibility to distribute content via streaming, including the option to use encryption and features DRM (Digital Rights Management).
Adobe Flash has revolutionized the distribution of video content on the web, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F23%2Fusing-dynamic-streaming-with-flash-media-server-3-5%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F23%2Fusing-dynamic-streaming-with-flash-media-server-3-5%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Adobe Flash has revolutionized the distribution of video content on the web, we have the Adobe Flash Media Server that helped with this by giving the possibility to distribute content via streaming, including the option to use encryption and features DRM (Digital Rights Management)<span id="more-615"></span>.</p>
<blockquote><p>Adobe Flash has revolutionized the distribution of video content on the web, we have the Adobe Flash Media Server that helped with this by giving the possibility to distribute content via streaming, including the option to use encryption and features DRM (Digital Rights Management).</p></blockquote>
<p>O Adobe Flash Media Server 3.5 and Flash Player 10 brings some novelties, among them the possibility to use the Dynamic streaming for content distribution.<br />
Imagine the following scenario, you use a 3G internet limited(my case <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ), glad you're watching a video and notes of nothing, the video begins to catch, and you've used all your available bandwidth and now can only use the minimum that the carrier provides. Another scenario is that the same video can be viewed both via the desktop or any mobile device such as smartphones, which have limited memory, processing power and smaller screen. Flash Media Server can depending on network conditions and client resources, exchange content (audio, video or both) with one that better fits the current conditions of the customer, thus guaranteeing the QoS (Quality of Service).</p>
<blockquote><p>
Flash Media Server can depending on network conditions and client resources, exchange content (audio, video or both) with one that better fits the current conditions of the customer, thus guaranteeing the QoS (Quality of Service).
</p></blockquote>
<p><div id="attachment_893" class="wp-caption alignleft" style="width: 484px"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/va_dyn_str.png" alt="Dynamic Streaming helps ensure the QoS(Quality of Service)" title="Dynamic Streaming helps ensure the QoS(Quality of Service)" width="474" height="250" class="size-full wp-image-893" /><p class="wp-caption-text">Dynamic Streaming helps ensure the QoS(Quality of Service)</p></div><br />
Adobe recommends that you use dynamic streaming when you find the following criteria:</p>
<ul>
<li>Video with long duration.</li>
<liVideo with large file size.</li>
<li>HD video.</li>
<li>Video with larger dimensions, such as full screen video.</li>
<li>Content distributed to users who are more susceptible to bandwidth issues, such as home users, rather than corporate users</li>
</ul>
<blockquote><p>
QoS - Quality of Service - refers to resource reservation control mechanisms rather than the achieved service quality. Source: <a href="http://en.wikipedia.org/wiki/Quality_of_service">Wikipedia.</a>
</p></blockquote>
<p>See in detail the use of dynamic streaming in <a href="http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7fea.html">Adobe's documentation</a>.<br />
See also these two articles devnet with fonts available for download:</p>
<ul>
<li><a href="http://www.adobe.com/go/fms_dynamicstreaming">Live dynamic streaming with Flash Media Server 3.5</a></li>
<li><a href="http://www.adobe.com/go/fms_dynstream_bestpractices">Dynamic streaming in Flash Media Server 3.5 – Part 1: Overview of the new capabilities</a></li>
</ul>
<p><strong>Recommended books:</strong><br />
<a href="http://www.amazon.com/gp/product/0240809475?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0240809475">Hands-On Guide to Flash Video: Web Video and Flash Media Server (Hands-On Guide Series)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0240809475" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470131136?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470131136">Flash Video for Professionals: Expert Techniques for Integrating Video on the Web</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470131136" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0979500303?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0979500303">Introduction to Flash Media Server 2</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0979500303" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/23/using-dynamic-streaming-with-flash-media-server-3-5/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Options for Mobile Development</title>
		<link>http://www.leonardofranca.com/index.php/2010/08/19/options-for-mobile-development/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/08/19/options-for-mobile-development/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 21:07:56 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[IPhone]]></category>
		<category><![CDATA[JME]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=606</guid>
		<description><![CDATA[
			
				
			
		
The mobile market is one of the fastest growing lately, and with it the demand for applications for this growing niche also bringing one more option for anyone who is a developer and new business opportunities. You developer who likes to keep up, you know exactly what I'm talking about. In this article I gathered [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F19%2Foptions-for-mobile-development%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F08%2F19%2Foptions-for-mobile-development%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/08/hero1-e1281834448422.jpg" alt="Desenvolvimento Mobile" title="" width="150" height="78" class="alignleft size-full wp-image-849" />The mobile market is one of the fastest growing lately, and with it the demand for applications for this growing niche also bringing one more option for anyone who is a developer and new business opportunities. You developer who likes to keep up, you know exactly what I'm talking about. In this article I gathered some links that those who want to start with mobile development in at least three different platform in which I had lately demands.<span id="more-606"></span></p>
<blockquote><p>The mobile market is one of the fastest growing lately, and with it the demand for applications for this growing niche also bringing one more option for anyone who is a developer and new business opportunities</p></blockquote>
<p>Among the platforms available for mobile development, we can highlight:</p>
<ul>
<li>Java with JME</li>
<li>Nokia Qt, besides being able to use WRT(Web RunTime)</li>
<li>Flash Lite</li>
<li>Android SDK from Google with the addition of Adobe AIR and Flash Player 10.1</li>
<li>IPhone</li>
</ul>
<p>'ll Comment a little bit of each:</p>
<p><strong>Java with JME</strong><br />
JME (Java Micro Edition) is the version that Sun offers for you to program in Java for mobile devices. It offers an enormous range of API's that were made specifically. Has a very complete <a href="http://www.oracle.com/technetwork/java/javame/documentation/apis-jsp-137855.html">documentation</a> and several examples. I leave a link <a href="http://www.autexier.de/jmau/dev/j2me/j2me.html">how to set up your environment for development JME</a>.</p>
<p><strong>Nokia Qt</strong><br />
Nokia offers <a href="http://qt.nokia.com/">Qt</a>, Cross-plaftorm application and UI framework, with specific libraries for mobile devices (such as <a href="http://qt.nokia.com/developer/new-qt-apis">QTMobility</a>). You program in C++ and there is an interface language like MXML. Has its own IDE and has emulators for Symbian S60, 40 and <a href="http://www.symbiantweet.com/symbian3-is-here">Symbian^3</a> beyond  <a href="http://maemo.nokia.com/">Maemo </a>and <a href="http://meego.com/">Meego</a>.</p>
<p><strong>Adobe Flash Lite</strong><br />
Adobe Flash Lite still has <a href="http://www.leonardofranca.com/index.php/2010/07/29/flash-lite-is-dead/">space on the market</a>, with a different version of the Flash player with some features specific to mobile devices. The development environment is to own Adobe Flash Professional and Adobe Device Central.</p>
<p><strong>Google Android</strong><br />
Google offers for the Android platform a set of <a href="http://developer.android.com/sdk/index.html">SDK's  and emulators</a> for the different versions of its operating system with each passing day it becomes more popular. It has a plugin for you to program in Eclipse, the <a href="https://dl-ssl.google.com/android/eclipse/">Android Development Tools(ADT)</a>. The language used is Java. From Android 2.2 (Froyo) you have the option to create applications in Adobe AIR, the AIR runtime is installed on the device and you create the application using Adobe Flash Professional (which has an extension to create the files .apk) or Adobe Flash Builder.</p>
<p><strong>Apple IPhone</strong><br />
Who wants to program for iPhone, ipad and the like, <a href="http://developer.apple.com/iphone/index.action"> Apple provides an SDK</a>. You use the <a href="http://developer.apple.com/iphone/library/referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/index.html#//apple_ref/doc/uid/TP40007594">Objective-C</a> language, derived from C, and some interesting libraries developed for working with muiltitouch like <a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002974">Cocoa</a>.  We'll find a list of <a href="http://iphoneized.com/2009/11/18-mobile-frameworks-development-tools-creating-iphone-apps/">frameworks</a>.</p>
<p>Well, we have options, it behooves us to analyze only that can best serve our customers. Should stay something about <a href="http://www.windowsphone7.com/">Windows Phone 7</a> because it seems to me very promising and deserves attention too.</p>
<p><strong>Recommended Books:</strong><br />
<strong>JME</strong><br />
<a href="http://www.amazon.com/gp/product/1430210613?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1430210613">Beginning Java&trade; ME Platform (Beginning from Novice to Professional)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1430210613" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0072227109?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0072227109">J2ME: The Complete Reference</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0072227109" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0131405306?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0131405306">Enterprise J2ME: Developing Mobile Java Applications</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0131405306" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/1592001181?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1592001181">J2ME Game Programming (Game Development)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1592001181" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><strong>Nokia Qt, C++, Symbian, Meego</Strong><br />
<a href="http://www.amazon.com/gp/product/0470750103?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470750103">Qt for Symbian</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470750103" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/1155266609?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1155266609">S60 (Software Platform): Qt, Nokia 5800 Xpressmusic, S60, Nokia Pc Suite, Python for S60, the Core Pocket Media Player, Nokia E75</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1155266609" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/1430231777?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1430231777">Beginning Nokia Apps Development: Using MeeGo, Mobile QT and OpenSymbian</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1430231777" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470744197?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470744197">Porting to the Symbian Platform: Open Mobile Development in C/C++ (Symbian Press)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470744197" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><strong>Adobe Flash Lite</strong><br />
<a href="http://www.amazon.com/gp/product/1430219041?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1430219041">AdvancED Flash on Devices: Mobile Development with Flash Lite and Flash 10</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1430219041" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470547480?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470547480">Professional Flash Lite Mobile Development (Wrox Programmer to Programmer)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470547480" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/1590595580?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1590595580">Foundation Flash Applications for Mobile Devices</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1590595580" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><strong>Android</strong><br />
<a href="http://www.amazon.com/gp/product/1934356565?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1934356565">Hello, Android: Introducing Google's Mobile Development Platform (Pragmatic Programmers)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1934356565" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0596521472?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596521472">Android Application Development: Programming with the Google SDK</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0596521472" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470565527?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470565527">Professional Android 2 Application Development (Wrox Programmer to Programmer)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470565527" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><strong>IPhone</strong><br />
<a href="http://www.amazon.com/gp/product/1430224592?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1430224592">Beginning iPhone 3 Development: Exploring the iPhone SDK</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1430224592" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0321706242?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321706242">iPhone Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0321706242" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0321659570?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0321659570">The iPhone Developer's Cookbook: Building Applications with the iPhone 3.0 SDK (2nd Edition)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0321659570" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p><strong>Windows Phone 7</strong><br />
<a href="http://www.amazon.com/gp/product/1449388361?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1449388361">Learning Windows Phone Programming</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1449388361" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/1430229284?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1430229284">Windows Mobile Game Development: Building games for the Windows Phone and other mobile devices (Expert's Voice in .NET)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1430229284" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0735643350?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0735643350">Programming Windows Phone 7</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0735643350" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/08/19/options-for-mobile-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Lite is dead?</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/29/flash-lite-is-dead/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/29/flash-lite-is-dead/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 03:11:00 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=597</guid>
		<description><![CDATA[
			
				
			
		
One of the questions you do lately is the possible death of Flash Lite. We have the Flash Player 10.1 optimized for mobile and Adobe AIR 2.5 for Android, and with that Flash Lite would be in their final days.
I've read articles that argued that Adobe did not know that capitalize on the success that [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F29%2Fflash-lite-is-dead%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F29%2Fflash-lite-is-dead%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/07/nokia_121609.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/07/nokia_121609.jpg" alt="" title="nokia_121609" width="125" height="102" class="alignleft size-full wp-image-823" /></a>One of the questions you do lately is the possible death of Flash Lite. We have the Flash Player 10.1 optimized for mobile and Adobe AIR 2.5 for Android, and with that Flash Lite would be in their final days.<br />
I've read articles that argued that Adobe did not know that capitalize on the success that Macromedia has with Flash Lite in Japan and began to give priority for mobile systems only now<span id="more-597"></span>. This can be a little truth, but Adobe does not mess around, now this with full force for a variety of devices, not only mobile.<br />
Now our question which gave title to the article, along with Flash Player 10.1, Adobe released Flash Lite 4.0 also, being a version of Flash Player for devices with limited processing resources and memory but with support for ActionScript 3.0. See the list of <a href="http://help.adobe.com/en_US/flashlite/dev/4/WS58a04a822e3e5010cf686a7122f627160e-7ffb.html">features available here</a>.<br />
For one thing, each day brings more smartphones come with Android 2.2 (Froyo), which officially supports the Flash Player 10.1 and Adobe AIR 2.5. Also, we're seeing with Android smartphones (earlier) being updated with Froyo. That is, based on Flash contents tends to grow with these major smartphones. On the other hand so far, have only a smartphone officially announced with Flash Lite 4.0, the <a href="http://www.forum.nokia.com/Devices/Device_specifications/N8/">Nokia N8</a> and possibly  <a href="http://www.engadget.com/2010/06/10/nokia-c7-caught-with-8-megapixel-camera/">Nokia C7</a>, the question remains, still worthwhile to develop content for Flash Lite?<br />
And my answer is <strong>YES</strong>, even for <a href="http://help.adobe.com/en_US/flashlite/dev/2x3x/index.html">Flash Lite 3.0 or 3.1</a>(ActionScript 2.0) especially for Nokia devices and why I say this. Let's see some facts:</p>
<ul>
<li>Nokia is still <a href="http://communities-dominate.blogs.com/brands/2010/02/phone-market-shares-for-year-of-2009-and-last-quarter-2009.html">world leader</a> on mobile devices and how it has always been an innovator(<a href="http://www.gamevicio.com.br/i/noticias/49/49290-nokia-alfineta-apple-priorizamos-o-desempenho-da-antena/index.html">was the first to put an internal antenna</a>), not let that lead get away so easy</li>
<li>The operating system <a href="http://communities-dominate.blogs.com/brands/2010/02/phone-market-shares-for-year-of-2009-and-last-quarter-2009.html">Symbian</a> is still the most used for mobile systems, and Nokia betting on Symbian will continue with the <a href="http://meego.com/">Meego</a>(Linux-based)</li>
<li>We have an extensive list of phones <a href="http://www.flashlite4nokia.com/">Nokia that has Flash Lite 2.0 or 3.0</a> , about 400 million around the world, many now arriving in Brazil</li>
<li><a href="http://www.flashlite4se.com/">Sony</a> and Samsung also has a good range of handsets with Flash Lite</li>
<li>Is starting to grow the number of applications in Portuguese on <a href="https://store.ovi.com/applications">OVI Store</a>, highlight for <a href="http://store.ovi.com/content/34057">MTV Ao Vivo</a>, the <a href="http://store.ovi.com/content/22806">Terra TV</a> and <a href="http://store.ovi.com/content/40292">VEJA São Paulo</a></li>
<li>Nokia has created a <a href="http://www.forum.nokia.com/info/sw.nokia.com/id/43ca0681-c8c6-4684-ad71-c4ac41f3ee4f/Flash_Lite_Developers_Library.html"> library </a>especially to increase the capabilities of Flash Lite</li>
<li><a href="http://www.adobe.com/devnet/devicecentral/">Adobe Device Central</a> CS5 offers a fairly complete for you to test your application in various mobile devices</li>
<li><a href="http://www.adobe.com/devnet/devices/nokia.html">Nokia and Adobe</a> were the first to contribute to the project <a href="http://www.openscreenproject.org/developers/get_started.html">Open Screen Project</a> - one content, several devices</li>
</ul>
<p>So in conclusion, is a market for development and yet it is worth studying (and remember) Actionscript 2.0. I believe that we will have two or three years of life for Flash Lite.</p>
<p><strong>Recommended Books:</strong></p>
<table>
<tr>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1430219041&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0470547480&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1590595580&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm.amazon.com/e/cm?t=leonafranc-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=B003BNZD5K&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/29/flash-lite-is-dead/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Monetize your AIR applications with Melrose</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/26/monetize-your-air-applications-with-melrose/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/26/monetize-your-air-applications-with-melrose/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 15:25:48 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=581</guid>
		<description><![CDATA[
			
				
			
		
This business model has become a fad in the world, you provide your application through a large company, we have examples such as Apple's App Store, Nokia with Ovi Store, Google Android Market. The advantages are many and generate greater confidence for the user and off course that Adobe could not be left out.
Previously called [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F26%2Fmonetize-your-air-applications-with-melrose%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F26%2Fmonetize-your-air-applications-with-melrose%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>This business model has become a fad in the world, you provide your application through a large company, we have examples such as Apple's App Store, Nokia with Ovi Store, Google Android Market. The advantages are many and generate greater confidence for the user and off course that Adobe could not be left out.<br />
Previously called Shibuya, now Adobe Melrose seeks to offer basically three types of services for those who develop applications on Adobe AIR:</p>
<ul>
<li><strong>Try and Buy</strong> - When you are developing your AIR application, you simply embed the licensing SWC in your application, enter a few lines of code and specify the price and trial periods online. </li>
<li><strong>Monetize</strong> -When end user customers purchase your application, the Melrose service keeps track of the income from each of your applications. You get paid at a regular interval, typically once a month.</li>
<li><strong>View analytics</strong> - Reports are available online via the Adobe Developer Connection site. In this initial release you'll be able to view reporting information regarding revenue, active trials, expired trials and downloads. This information is available for everywhere you use Melrose-not just for downloads from the Adobe AIR Marketplace. </li>
</ul>
<p>More:<br />
<a href="http://labs.adobe.com/technologies/melrose/">Melrose Labs</a><br />
<a href="http://learn.adobe.com/wiki/display/melrose/">Documentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/26/monetize-your-air-applications-with-melrose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the local database with Adobe AIR</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/23/using-the-local-database-with-adobe-air/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/23/using-the-local-database-with-adobe-air/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 22:21:20 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=586</guid>
		<description><![CDATA[
			
				
			
		
We often need our system can store data locally without the need for a robust database as a MySQL or SQL Server, or even that data can be stored locally for later synchronization with a remote database. Adobe AIR offers the possibility of working with database locally, your bank is based on the SQLite database, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F23%2Fusing-the-local-database-with-adobe-air%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F23%2Fusing-the-local-database-with-adobe-air%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>We often need our system can store data locally without the need for a robust database as a MySQL or SQL Server, or even that data can be stored locally for later synchronization with a remote database. Adobe AIR offers the possibility of working with database locally, your bank is based on the SQLite database, the more used to this kind of need to be very fast and easy to work with. Was added transaction support in Adobe AIR 2.0<span id="more-586"></span>.<br />
Let's do a simple example, start with the SQLConnection class, she will be responsible for connecting with our local bank, it is also defined that the database will be used only in memory or whether it created a local file (extension. db).</p>
<div class="igBar"><span id="lactionscript3-28"><a href="#" onclick="javascript:showPlainTxt('actionscript3-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-28">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">conn = <span style="color: #0033ff; font-weight: bold;">new</span> SQLConnection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.<span style="color: #004993;">open</span><span style="color: #000000;">&#40;</span>dbFile<span style="color: #000000;">&#41;</span>;<span style="color: #009900;">//conn.open(null) passe null para o banco ser criado somente em memoria</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span>err<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=error%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:error.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">Error</span></a><span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>ObjectUtil.<span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span>err<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In this case, I am creating a local file to the database. dbfiles is an instance of the File class:</p>
<div class="igBar"><span id="lactionscript3-29"><a href="#" onclick="javascript:showPlainTxt('actionscript3-29'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-29">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">dbFile = File.applicationStorageDirectory.resolvePath<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;dbFile.db&quot;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Having created our database, we create our table for storing data. We will use the class SQLStatement.</p>
<div class="igBar"><span id="lactionscript3-30"><a href="#" onclick="javascript:showPlainTxt('actionscript3-30'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-30">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">createStmt = <span style="color: #0033ff; font-weight: bold;">new</span> SQLStatement<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createStmt.sqlConnection = conn;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
We will pass by the SQL string to create the table then to be performed by AIR:</p>
<div class="igBar"><span id="lactionscript3-31"><a href="#" onclick="javascript:showPlainTxt('actionscript3-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-31">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #6699cc; font-weight: bold;">var</span> sql<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;CREATE TABLE IF NOT EXISTS contato (&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;&nbsp; &nbsp; id&nbsp; INTEGER PRIMARY KEY AUTOINCREMENT,&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;&nbsp; &nbsp; nome&nbsp; &nbsp; TEXT,&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;&nbsp; &nbsp; email &nbsp; TEXT&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;)&quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">createStmt.<span style="color: #004993;">text</span> = sql;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0033ff; font-weight: bold;">try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createStmt.execute<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">catch</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000000; font-weight: bold;">:</span>SQLError<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;CREATE TABLE error:&quot;</span>, <span style="color: #004993;">error</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.message:&quot;</span>, <span style="color: #004993;">error</span>.<span style="color: #004993;">message</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.details:&quot;</span>, <span style="color: #004993;">error</span>.details<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">void</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
We have our database and tables created, let's create a form to enter some data in the database:</p>
<div class="igBar"><span id="lactionscript3-32"><a href="#" onclick="javascript:showPlainTxt('actionscript3-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-32">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">insertStmt = <span style="color: #0033ff; font-weight: bold;">new</span> SQLStatement<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt.sqlConnection = conn;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> sql<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;INSERT INTO contatos (nome, email) &quot;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql <span style="color: #000000; font-weight: bold;">+</span>= <span style="color: #990000;">&quot;VALUES ('&quot;</span><span style="color: #000000; font-weight: bold;">+</span>txtNome.<span style="color: #004993;">text</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">&quot;', '&quot;</span><span style="color: #000000; font-weight: bold;">+</span>txtEmail.<span style="color: #004993;">text</span><span style="color: #000000; font-weight: bold;">+</span><span style="color: #990000;">&quot;')&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt.<span style="color: #004993;">text</span> = sql;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt.execute<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000000; font-weight: bold;">:</span>SQLError<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;INSERT error:&quot;</span>, <span style="color: #004993;">error</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.message:&quot;</span>, <span style="color: #004993;">error</span>.<span style="color: #004993;">message</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.details:&quot;</span>, <span style="color: #004993;">error</span>.details<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">void</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now just create the method to execute the select</p>
<div class="igBar"><span id="lactionscript3-33"><a href="#" onclick="javascript:showPlainTxt('actionscript3-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-33">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">selectStmt = <span style="color: #0033ff; font-weight: bold;">new</span> SQLStatement<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt.sqlConnection = conn;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> sql<span style="color: #000000; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html&amp;filter=0&amp;num=100&amp;btnI=lucky"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;SELECT id, nome, email FROM contatos&quot;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt.<span style="color: #004993;">text</span> = sql;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt.execute<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">catch</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">error</span><span style="color: #000000; font-weight: bold;">:</span>SQLError<span style="color: #000000;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;SELECT error:&quot;</span>, <span style="color: #004993;">error</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.message:&quot;</span>, <span style="color: #004993;">error</span>.<span style="color: #004993;">message</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;error.details:&quot;</span>, <span style="color: #004993;">error</span>.details<span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">return</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #6699cc; font-weight: bold;">var</span> result<span style="color: #000000; font-weight: bold;">:</span>SQLResult = selectStmt.getResult<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dg.dataProvider = result.<span style="color: #004993;">data</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
Following is the complete code:</p>
<div class="igBar"><span id="lmxml-34"><a href="#" onclick="javascript:showPlainTxt('mxml-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MXML:</span>
<div id="mxml-34">
<div class="mxml" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:WindowedApplication</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.data.SQLConnection;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.data.SQLResult;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.data.SQLStatement;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.errors.SQLError;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.events.MouseEvent;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import flash.filesystem.File;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.utils.ObjectUtil;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var conn:SQLConnection;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var dbFile:File;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var createStmt:SQLStatement;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var createStatusStmt:SQLStatement;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var insertStmt:SQLStatement;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private var selectStmt:SQLStatement;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; override protected function childrenCreated<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; super.childrenCreated<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dbFile = File.applicationStorageDirectory.resolvePath<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;dbContatos.db&quot;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn = new SQLConnection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.open<span style="color: #66cc66;">&#40;</span>dbFile<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch<span style="color: #66cc66;">&#40;</span>err:Error<span style="color: #66cc66;">&#41;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span>ObjectUtil.toString<span style="color: #66cc66;">&#40;</span>err<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createTable<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; btnInsert.addEventListener<span style="color: #66cc66;">&#40;</span>MouseEvent.CLICK,addData<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private function createTable<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createStmt = new SQLStatement<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createStmt.sqlConnection = conn;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sql:String = <span style="color: #ff0000;">&quot;&quot;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;CREATE TABLE IF NOT EXISTS contatos (&quot;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;&nbsp; &nbsp; id&nbsp; INTEGER PRIMARY KEY AUTOINCREMENT,&quot;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;&nbsp; &nbsp; nome&nbsp; &nbsp; TEXT,&quot;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;&nbsp; &nbsp; email &nbsp; TEXT&quot;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;)&quot;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createStmt.text = sql;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; createStmt.execute<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch<span style="color: #66cc66;">&#40;</span>error:SQLError<span style="color: #66cc66;">&#41;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;CREATE TABLE error:&quot;</span>, error<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;error.message:&quot;</span>, error.message<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;error.details:&quot;</span>, error.details<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return void;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private function addData<span style="color: #66cc66;">&#40;</span>evt:MouseEvent=null<span style="color: #66cc66;">&#41;</span>:void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt = new SQLStatement<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt.sqlConnection = conn;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sql:String = <span style="color: #ff0000;">&quot;&quot;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;INSERT INTO contatos (nome, email) &quot;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sql += <span style="color: #ff0000;">&quot;VALUES ('&quot;</span>+txtNome.text+<span style="color: #ff0000;">&quot;', '&quot;</span>+txtEmail.text+<span style="color: #ff0000;">&quot;')&quot;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt.text = sql;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insertStmt.execute<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch <span style="color: #66cc66;">&#40;</span>error:SQLError<span style="color: #66cc66;">&#41;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;INSERT error:&quot;</span>, error<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;error.message:&quot;</span>, error.message<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;error.details:&quot;</span>, error.details<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return void;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private function getData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt = new SQLStatement<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt.sqlConnection = conn;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var sql:String = <span style="color: #ff0000;">&quot;SELECT id, nome, email FROM contatos&quot;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt.text = sql;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectStmt.execute<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; catch <span style="color: #66cc66;">&#40;</span>error:SQLError<span style="color: #66cc66;">&#41;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;SELECT error:&quot;</span>, error<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;error.message:&quot;</span>, error.message<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;error.details:&quot;</span>, error.details<span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var result:SQLResult = selectStmt.getResult<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dg.dataProvider = result.data;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ViewStack</span> x=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;68&quot;</span> id=<span style="color: #ff0000;">&quot;viewstack1&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;198&quot;</span> creationPolicy=<span style="color: #ff0000;">&quot;all&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:NavigatorContent</span> label=<span style="color: #ff0000;">&quot;Registros&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGrid</span> id=<span style="color: #ff0000;">&quot;dg&quot;</span> x=<span style="color: #ff0000;">&quot;18&quot;</span> y=<span style="color: #ff0000;">&quot;30&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:columns</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> headerText=<span style="color: #ff0000;">&quot;ID&quot;</span> width=<span style="color: #ff0000;">&quot;25&quot;</span> dataField=<span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> headerText=<span style="color: #ff0000;">&quot;Nome&quot;</span> width=<span style="color: #ff0000;">&quot;200&quot;</span> dataField=<span style="color: #ff0000;">&quot;nome&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:DataGridColumn</span> headerText=<span style="color: #ff0000;">&quot;Email&quot;</span> width=<span style="color: #ff0000;">&quot;200&quot;</span> dataField=<span style="color: #ff0000;">&quot;email&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:columns</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:DataGrid</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:NavigatorContent</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:NavigatorContent</span> label=<span style="color: #ff0000;">&quot;Inserir Registro&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;10&quot;</span> text=<span style="color: #ff0000;">&quot;Inserir Registro&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;34&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Nome:&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextInput</span> id=<span style="color: #ff0000;">&quot;txtNome&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;Email:&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextInput</span> id=<span style="color: #ff0000;">&quot;txtEmail&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;btnInsert&quot;</span> label=<span style="color: #ff0000;">&quot;Inserir&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:NavigatorContent</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ViewStack</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:LinkBar</span> x=<span style="color: #ff0000;">&quot;0&quot;</span> y=<span style="color: #ff0000;">&quot;35&quot;</span> dataProvider=<span style="color: #ff0000;">&quot;{viewstack1}&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:LinkBar</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:WindowedApplication</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>more:<br />
<a href="http://www.adobe.com/go/learn_air_qs_SQLasynch_en">Quick Start: Working asynchronously with a local SQL database (Flex)</a><br />
<a href="http://www.adobe.com/go/learn_air_qs_SQLasynch_flash_en">Quick Start: Working asynchronously with a local SQL database (Flash)</a><br />
<a href="http://www.adobe.com/go/learn_air_qs_SQLasynch_html_en">Quick Start: Working asynchronously with a local SQL database (HTML)</a><br />
<a href="http://www.adobe.com/go/learn_air_qs_SQLsynch_en">Quick Start: Working synchronously with a local SQL database (Flex)</a><br />
<a href="http://www.adobe.com/go/learn_air_qs_SQLsynch_flash_en">Quick Start: Working synchronously with a local SQL database (Flash)</a><br />
<a href="http://www.adobe.com/go/learn_air_qs_SQLsynch_html_en">Quick Start: Working synchronously with a local SQL database (HTML)</a></p>
<p>Books:<br />
<a href="http://www.amazon.com/gp/product/0470284684?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470284684">Adobe AIR Bible (Bible (Wiley))</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470284684" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/1933988487?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=1933988487">Adobe AIR in Action</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=1933988487" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/23/using-the-local-database-with-adobe-air/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adobe Certified Expert Flex 4</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/19/adobe-certified-expert-flex-4/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/19/adobe-certified-expert-flex-4/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:22:55 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=577</guid>
		<description><![CDATA[
			
				
			
		
Available today is the certification exam of Adobe Flex 4 (Flex 4 # ACE Exam 9A0-129) since July 16, Now you have 59 questions related to Creating a User Interface (UI), Flex system architecture and design, Programming Flex applications with ActionScript, Interacting with data sources and servers and Using Flex in the Adobe Integrated Runtime [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F19%2Fadobe-certified-expert-flex-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F19%2Fadobe-certified-expert-flex-4%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Available today is the certification exam of Adobe Flex 4 (Flex 4 # ACE Exam 9A0-129) since July 16, Now you have 59 questions related to Creating a User Interface (UI), Flex system architecture and design, Programming Flex applications with ActionScript, Interacting with data sources and servers and Using Flex in the Adobe Integrated Runtime (AIR)<br />
You need at least 67% to pass.<br />
The proof is performed in authorized centers online by Adobe and you mark the exam through sites <a href="http://www.prometric.com">Prometric</a> or <a href = "http://www.pearsonvue.com/adobe ">Pearson VUE</ a><br />
More details:<br />
<a href="http://partners.adobe.com/public/ace/main.html">http://partners.adobe.com/public/ace/main.html</a><br />
<a href="http://partners.adobe.com/public/en/ace/ACE_Exam_Guide_Flex4.pdf">http://partners.adobe.com/public/en/ace/ACE_Exam_Guide_Flex4.pdf</a><br />
<a href="http://www.pearsonvue.com/adobe">http://www.pearsonvue.com/adobe</a><br />
<a href="http://www.prometric.com">http://www.prometric.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/19/adobe-certified-expert-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BR Conference</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/12/br-conference/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/12/br-conference/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 16:27:35 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=570</guid>
		<description><![CDATA[
			
				
			
		
BR Conference 2010 is the first event held in Brazil on RIA (Rich Internet Application) and ColdFusion.
With the support of  Adobe Systems Inc's  and share some of the best and most renowned professionals in the world the tools and technologies ColdFusion, Flex, AIR, Flash Media Server and LiveCycle, BR Conference 2010 is an [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F12%2Fbr-conference%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F12%2Fbr-conference%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><div id="attachment_745" class="wp-caption alignleft" style="width: 200px"><a href="http://www.brconference.com/en/"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/07/banner_brconference_190x70.png" alt="" title="banner_brconference_190x70" width="190" height="70" class="size-full wp-image-745" /></a><p class="wp-caption-text">BR Conference</p></div><br />
BR Conference 2010 is the first event held in Brazil on RIA (Rich Internet Application) and ColdFusion.<br />
With the support of <a href="http://www.adobe.com/"> Adobe Systems Inc's </a> and share some of the best and most renowned professionals in the world the tools and technologies ColdFusion, Flex, AIR, Flash Media Server and LiveCycle, BR Conference 2010 is an event created by developers for developers.<br />
<a href="http://www.brconference.com/en/"> Learn more ... </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/12/br-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authenticating users in Flash Media Server with Flash Media Live Encoder</title>
		<link>http://www.leonardofranca.com/index.php/2010/07/05/authenticating-users-in-flash-media-server-with-flash-media-live-encoder/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/07/05/authenticating-users-in-flash-media-server-with-flash-media-live-encoder/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 16:43:50 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=559</guid>
		<description><![CDATA[
			
				
			
		
Adobe Flash Media Live Encoder is a free software that Adobe offers for you to use to convey stream directly to a server and deploy Flash Media Server for your Web site or application.
Among the options available are:

High Quality Encode
H264 / VP6 Video
AAC / MP3 Audio
Command-line
Error Handling
VITC Timecode
Pre-processing
Live Metadata
Local Archive
DVR Support

With support for a variety [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F05%2Fauthenticating-users-in-flash-media-server-with-flash-media-live-encoder%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F07%2F05%2Fauthenticating-users-in-flash-media-server-with-flash-media-live-encoder%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Adobe Flash Media Live Encoder is a free software that Adobe offers for you to use to convey stream directly to a server and deploy Flash Media Server for your Web site or application<span id="more-559"></span>.<br />
Among the options available are:</p>
<ul>
<li>High Quality Encode</li>
<li>H264 / VP6 Video</li>
<li>AAC / MP3 Audio</li>
<li>Command-line</li>
<li>Error Handling</li>
<li>VITC Timecode</li>
<li>Pre-processing</li>
<li>Live Metadata</li>
<li>Local Archive</li>
<li>DVR Support</li>
</ul>
<p>With support for a variety of capture devices like webcam video, SDI, Composite, Component, Firewire.<br />
There are cases where you need to restrict access to Flash Media Server via the Flash Media Live Encoder for that Adobe has created a plugin that is installed on your server, Flash Media Server, Flash Media Server Authentication Add-in.<br />
Para instalar esse plugin, siga os seguintes passos:<br />
Download and install Flash Media Server Authentication Add-in<br />
<a href="https://www.adobe.com/cfusion/entitlement/index.cfm?e=fmle3">https://www.adobe.com/cfusion/entitlement/index.cfm?e=fmle3</a><br />
Then use the command prompt and go to conf directory Flash Media Server<br />
C:\Arquivos de programas\Adobe\Flash Media Server 3.5\conf<br />
To create a new user, simply use the command: </p>
<blockquote><p>users add -u user -p 123</p></blockquote>
<p>Where is the user login and password is 123<br />
Note that the directory C:\Arquivos de programas\Adobe\Flash Media Server 3.5\conf Now there are two files, users.exe and users.dat, logins and passwords are saved in users.dat<br />
Now simply open the Flash Media Live Encoder and try to connect, it asks login and password.<br />
One of the advantages of Flash Media Live Encoder is that it recognizes most devices that capture the Flash Player.<br />
More:<br />
<a href="http://www.adobe.com/products/flashmediaserver/flashmediaencoder/">http://www.adobe.com/products/flashmediaserver/flashmediaencoder/</a><br />
<a href="http://www.adobe.com/support/documentation/en/flashmedialiveencoder/">http://www.adobe.com/support/documentation/en/flashmedialiveencoder/</a></p>
<p>Recommended Books:<br />
<a href="http://www.amazon.com/gp/product/0240809475?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0240809475">Hands-On Guide to Flash Video: Web Video and Flash Media Server (Hands-On Guide Series)</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0240809475" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0470131136?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0470131136">Flash Video for Professionals: Expert Techniques for Integrating Video on the Web</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0470131136" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
<a href="http://www.amazon.com/gp/product/0979500303?ie=UTF8&#038;tag=leonafranc-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0979500303">Introduction to Flash Media Server 2</a><img src="http://www.assoc-amazon.com/e/ir?t=leonafranc-20&#038;l=as2&#038;o=1&#038;a=0979500303" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<p>Translations:<br />
<a href="http://wp.me/pkvj1-ar">Português do Brasil</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/07/05/authenticating-users-in-flash-media-server-with-flash-media-live-encoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Mania 2010</title>
		<link>http://www.leonardofranca.com/index.php/2010/06/09/flex-mania-2010/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/06/09/flex-mania-2010/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:36:38 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=554</guid>
		<description><![CDATA[
			
				
			
		
I invite all to participate in this online event, Flex Mania. This year's event will feature three days of lectures on various topics related to Flash Platform.
I'll be speaking about RTMFP, a new protocol supported from Flash Player 10 to use P2P as a resource in their applications.
More:
http://www.flexmania.com.br
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F06%2F09%2Fflex-mania-2010%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F06%2F09%2Fflex-mania-2010%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><div id="attachment_555" class="wp-caption aligncenter" style="width: 200px"><a href="http://www.flexmania.com.br"><img src="http://www.leonardofranca.com/wp-content/uploads/2010/06/speaker-190-150.jpg" alt="" title="speaker-190-150" width="190" height="152" class="size-full wp-image-555" /></a><p class="wp-caption-text">Flex Mania 2010</p></div>I invite all to participate in this online event, Flex Mania. This year's event will feature three days of lectures on various topics related to Flash Platform.<br />
I'll be speaking about RTMFP, a new protocol supported from Flash Player 10 to use P2P as a resource in their applications.<br />
More:<br />
<a href="http://www.flexmania.com.br">http://www.flexmania.com.br</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/06/09/flex-mania-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Group and ungroup data in AdvancedDataGrid</title>
		<link>http://www.leonardofranca.com/index.php/2010/04/07/group-and-ungroup-data-in-advanceddatagrid/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/04/07/group-and-ungroup-data-in-advanceddatagrid/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:35:36 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=549</guid>
		<description><![CDATA[
			
				
			
		
Needed to implement a feature that in a AdvancedDataGrid hours ordering the data by the first letter or not. First time I thought it was very difficult as I had done something similar in another project where it should split by examples hours the servers, time servers of the instances.
When looking at this old project, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F04%2F07%2Fgroup-and-ungroup-data-in-advanceddatagrid%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F04%2F07%2Fgroup-and-ungroup-data-in-advanceddatagrid%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Needed to implement a feature that in a AdvancedDataGrid hours ordering the data by the first letter or not. First time I thought it was very difficult as I had done something similar in another project where it should split by examples hours the servers, time servers of the instances.<br />
When looking at this old project, I thought it was very complicated and hard to understand, I returned to livedocs to study a little more.<span id="more-549"></span><br />
I used the example of Adobe and basic with some adjustments, I saw what I wanted to do was simpler than I thought.<br />
I have a data layer for simple demonstration, and at first, my food grid with it.</p>
<div class="igBar"><span id="lactionscript3-41"><a href="#" onclick="javascript:showPlainTxt('actionscript3-41'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT3:</span>
<div id="actionscript3-41">
<div class="actionscript3" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&#91;</span>Bindable<span style="color: #000000;">&#93;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> dpFlat<span style="color: #000000; font-weight: bold;">:</span>ArrayCollection = <span style="color: #0033ff; font-weight: bold;">new</span> ArrayCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Arizona&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Barbara Jennings&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">38865</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">40000</span><span style="color: #000000;">&#125;</span>, </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Arizona&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Dana Binn&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">29885</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">30000</span><span style="color: #000000;">&#125;</span>, &nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Central California&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Joe Smith&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">29134</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">30000</span><span style="color: #000000;">&#125;</span>, &nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Nevada&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Bethany Pittman&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">52888</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">45000</span><span style="color: #000000;">&#125;</span>, &nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Northern California&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Lauren Ipsum&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">38805</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">40000</span><span style="color: #000000;">&#125;</span>, </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Northern California&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;T.R. Smith&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">55498</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">40000</span><span style="color: #000000;">&#125;</span>, &nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southern California&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Alice Treu&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">44985</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">45000</span><span style="color: #000000;">&#125;</span>, </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #000000;">&#123;</span>Region<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southwest&quot;</span>, Territory<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Southern California&quot;</span>, </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;Territory_Rep<span style="color: #000000; font-weight: bold;">:</span><span style="color: #990000;">&quot;Jane Grove&quot;</span>, Actual<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">44913</span>, Estimate<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;color:#800000;">45000</span><span style="color: #000000;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
A CheckBox is adding a listener to tell me when he is selected or not.</p>
<div class="igBar"><span id="lmxml-42"><a href="#" onclick="javascript:showPlainTxt('mxml-42'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MXML:</span>
<div id="mxml-42">
<div class="mxml" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;ckGroup&quot;</span> label=<span style="color: #ff0000;">&quot;Checkbox&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
My function that handles the event of the CheckBox will do the work group and ungroup data.</p>
<div class="igBar"><span id="lactionscript-43"><a href="#" onclick="javascript:showPlainTxt('actionscript-43'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-43">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handlerCheck<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>ckGroup.<span style="color: #006600;">selected</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;selected&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; gc.<span style="color: #006600;">source</span> = dpFlat;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; gc.<span style="color: #006600;">refresh</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; hView = <span style="color: #000000; font-weight: bold;">new</span> HierarchicalCollectionView<span style="color: #66cc66;">&#40;</span>gc<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; myADG.<span style="color: #006600;">dataProvider</span> = hView;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">else</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;no selected&quot;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; myADG.<span style="color: #006600;">dataProvider</span> = dpFlat;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
I am using the class GroupCollection which is responsible for grouping my data for a particular field to be displayed in AdvancedDataGrid. </p>
<div class="igBar"><span id="lmxml-44"><a href="#" onclick="javascript:showPlainTxt('mxml-44'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MXML:</span>
<div id="mxml-44">
<div class="mxml" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:GroupingCollection</span> id=<span style="color: #ff0000;">&quot;gc&quot;</span> source=<span style="color: #ff0000;">&quot;{dpFlat}&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:GroupingField name=&quot;Region&quot;/&gt;</span></span>--&gt;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:GroupingField</span> name=<span style="color: #ff0000;">&quot;Territory&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:GroupingCollection</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
Turning then to HierarchicalCollectionView that provides a hierarchical view of my data.</p>
<div class="igBar"><span id="lactionscript-45"><a href="#" onclick="javascript:showPlainTxt('actionscript-45'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-45">
<div class="actionscript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">gc.<span style="color: #006600;">source</span> = dpFlat;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">gc.<span style="color: #006600;">refresh</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">hView = <span style="color: #000000; font-weight: bold;">new</span> HierarchicalCollectionView<span style="color: #66cc66;">&#40;</span>gc<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">myADG.<span style="color: #006600;">dataProvider</span> = hView;</div>
</li>
</ol>
</div>
</div>
</div>
<p>
The complete example:</p>
<div class="igBar"><span id="lmxml-46"><a href="#" onclick="javascript:showPlainTxt('mxml-46'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MXML:</span>
<div id="mxml-46">
<div class="mxml" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span>?<span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #339933;">&lt;mx:Script&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp;&lt;![CDATA[</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import mx.collections.HierarchicalCollectionView;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;import mx.collections.ArrayCollection;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[Bindable]</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private var dpFlat:ArrayCollection = new ArrayCollection([</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Arizona&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Barbara Jennings&quot;, Actual:38865, Estimate:40000}, </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Arizona&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Dana Binn&quot;, Actual:29885, Estimate:30000}, &nbsp;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Central California&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Joe Smith&quot;, Actual:29134, Estimate:30000}, &nbsp;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Nevada&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Bethany Pittman&quot;, Actual:52888, Estimate:45000}, &nbsp;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Northern California&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Lauren Ipsum&quot;, Actual:38805, Estimate:40000}, </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Northern California&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;T.R. Smith&quot;, Actual:55498, Estimate:40000}, &nbsp;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Southern California&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Alice Treu&quot;, Actual:44985, Estimate:45000}, </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Region:&quot;Southwest&quot;, Territory:&quot;Southern California&quot;, </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Territory_Rep:&quot;Jane Grove&quot;, Actual:44913, Estimate:45000}</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;]);</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private var hView:HierarchicalCollectionView;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;override protected function childrenCreated():void</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; super.childrenCreated();</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ckGroup.addEventListener(Event.CHANGE,handlerCheck);</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myADG.dataProvider = dpFlat;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private function handlerCheck(evt:Event):void</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(ckGroup.selected)</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace(&quot;selected&quot;);</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gc.source = dpFlat;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gc.refresh();</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hView = new HierarchicalCollectionView(gc);</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myADG.dataProvider = hView;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trace(&quot;no selected&quot;);</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myADG.dataProvider = dpFlat;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp; &nbsp; &nbsp;]]&gt;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;"> &nbsp; &nbsp;&lt;/mx:Script&gt;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:GroupingCollection</span> id=<span style="color: #ff0000;">&quot;gc&quot;</span> source=<span style="color: #ff0000;">&quot;{dpFlat}&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- &nbsp; &nbsp; &nbsp; &nbsp; &lt;mx:GroupingField name=&quot;Region&quot;/&gt;</span></span>--&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:GroupingField</span> name=<span style="color: #ff0000;">&quot;Territory&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:grouping</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:GroupingCollection</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Panel</span> title=<span style="color: #ff0000;">&quot;AdvancedDataGrid Control Example&quot;</span> height=<span style="color: #ff0000;">&quot;75%&quot;</span> width=<span style="color: #ff0000;">&quot;75%&quot;</span> layout=<span style="color: #ff0000;">&quot;horizontal&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;10&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;10&quot;</span> paddingLeft=<span style="color: #ff0000;">&quot;10&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:AdvancedDataGrid</span> id=<span style="color: #ff0000;">&quot;myADG&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> initialize=<span style="color: #ff0000;">&quot;gc.refresh();&quot;</span><span style="color: #7400FF;">&gt;</span></span> &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:columns</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--&lt;mx:AdvancedDataGridColumn dataField=&quot;Region&quot;/&gt;</span></span>--&gt;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:AdvancedDataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;Territory&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:AdvancedDataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;Territory_Rep&quot;</span> headerText=<span style="color: #ff0000;">&quot;Territory Rep&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:AdvancedDataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;Actual&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:AdvancedDataGridColumn</span> dataField=<span style="color: #ff0000;">&quot;Estimate&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:columns</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:AdvancedDataGrid</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:ControlBar</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:CheckBox</span> id=<span style="color: #ff0000;">&quot;ckGroup&quot;</span> label=<span style="color: #ff0000;">&quot;Checkbox&quot;</span><span style="color: #7400FF;">/&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:ControlBar</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Panel</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>references:<br />
<a href="http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_06.html">http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid_06.html</a></p>
<p>Translations:<br />
<a href="http://wp.me/pkvj1-ah">Português do Brasil</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/04/07/group-and-ungroup-data-in-advanceddatagrid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple protection of content from Flash Media Server</title>
		<link>http://www.leonardofranca.com/index.php/2010/03/05/simple-protection-of-content-from-flash-media-server/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/03/05/simple-protection-of-content-from-flash-media-server/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 17:27:30 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=542</guid>
		<description><![CDATA[
			
				
			
		
I was called to resolve a problem with the protection of the contents of a client, the problem was that somebody malicious was stealing their live streams.
He simply took the html code of the site and pasted on her website, so you may transmit the content in your blog. The player in question was not [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F03%2F05%2Fsimple-protection-of-content-from-flash-media-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F03%2F05%2Fsimple-protection-of-content-from-flash-media-server%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>I was called to resolve a problem with the protection of the contents of a client, the problem was that somebody malicious was stealing their live streams.<br />
He simply took the html code of the site and pasted on her website<span id="more-542"></span>, so you may transmit the content in your blog. The player in question was not developed by me, so I did not even bother to look at the source, I decided to go directly to the Flash Media Server.<br />
Based on the documentation from Adobe, I decided in a very simple code main.asc is as follows:</p>
<div class="igBar"><span id="ljavascript-49"><a href="#" onclick="javascript:showPlainTxt('javascript-49'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-49">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;init application...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #003366; font-weight: bold;">var</span> VALID_REFERRER <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.mydomain.com.br/mySwf.swf&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #003366; font-weight: bold;">var</span> VALID_PAGEURL <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.mydomain.com.br/myPage.html&quot;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onAppStart</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;init app...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStart&gt; &quot;</span> <span style="color: #339933;">+</span> application.<span style="color: #000066;">name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; is starting at &quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onStatus</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>info<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onStatus&gt; info.level: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">level</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;, info.code: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">code</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onStatus&gt; info.description: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onStatus&gt; info.details: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">details</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onConnect</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>client.<span style="color: #660066;">referrer</span> <span style="color: #339933;">==</span> VALID_REFERRER <span style="color: #339933;">&amp;&amp;</span> client.<span style="color: #660066;">pageUrl</span> <span style="color: #339933;">==</span> VALID_PAGEURL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso permitido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">acceptConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso indevido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">rejectConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.ip: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">ip</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.pageUrl: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">pageUrl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.agent: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">agent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.referrer: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">referrer</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onConnect&gt; client.protocol: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #660066;">protocol</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onDisconnect</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onDisconnect&gt; client.name: &quot;</span> <span style="color: #339933;">+</span> client.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onDisconnect&gt; disconnecting at: &quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">application.<span style="color: #660066;">onAppStop</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>info<span style="color: #009900;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; application.name: &quot;</span> <span style="color: #339933;">+</span> application.<span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; stopping at &quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; info.level: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">level</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; info.code: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">code</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onAppStop&gt; info.description: &quot;</span> <span style="color: #339933;">+</span> info.<span style="color: #660066;">description</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
The API Flash Media Server is very powerful and contains many interesting features, one of them is the ability to know where exactly the connection is coming from the swf. This passage has solved the problem with the constants declared at the beginning of the file.</p>
<div class="igBar"><span id="ljavascript-50"><a href="#" onclick="javascript:showPlainTxt('javascript-50'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-50">
<div class="javascript" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>client.<span style="color: #660066;">referrer</span> <span style="color: #339933;">==</span> VALID_REFERRER <span style="color: #339933;">&amp;&amp;</span> client.<span style="color: #660066;">pageUrl</span> <span style="color: #339933;">==</span> VALID_PAGEURL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso permitido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">acceptConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#123;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; trace<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;acesso indevido&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; application.<span style="color: #660066;">rejectConnection</span><span style="color: #009900;">&#40;</span>client<span style="color: #009900;">&#41;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#26536A;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
In short, so the connection is made with Flash Media Server is attempting to connect comes from a SWF and HTML defined by me.<br />
A very simple solution but it solved the problem <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
As a last resort, the thief also copied the swf client and put into your blog <img src='http://www.leonardofranca.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>References:<br />
<a href="http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.pdf">http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.pdf</a><br />
<a href="http://www.flashcomguru.com/index.cfm/2007/7/3/video-content-protection">http://www.flashcomguru.com/index.cfm/2007/7/3/video-content-protection</a><br />
<a href="http://www.adobe.com/devnet/flashmediaserver/articles/digital_media_protection.html">http://www.adobe.com/devnet/flashmediaserver/articles/digital_media_protection.html</a><br />
<a href="http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.html">http://www.adobe.com/devnet/flashmediaserver/articles/protecting_video_fms.html</a><br />
<a href="http://blogs.adobe.com/security/2007/07/how_to_protect_flash_video_wit.html">http://blogs.adobe.com/security/2007/07/how_to_protect_flash_video_wit.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/03/05/simple-protection-of-content-from-flash-media-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Radicalism?</title>
		<link>http://www.leonardofranca.com/index.php/2010/02/25/radicalism/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/02/25/radicalism/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 14:38:47 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=538</guid>
		<description><![CDATA[
			
				
			
		
This post was originally written several years ago, it was only as a draft and strangely remains current.
Sometimes I see on the Internet some movement "anti-Flash", something really strange, it seems religion. There is a culture of saying that Flash is a program "to make a ball go" or that "Flash has accessibility zero, this [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F02%2F25%2Fradicalism%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F02%2F25%2Fradicalism%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>This post was originally written several years ago, it was only as a draft and strangely remains current.</p>
<p>Sometimes I see on the Internet some movement "anti-Flash", something really strange, it seems religion. There is a culture of saying that Flash is a program "to make a ball go" or that "Flash has accessibility zero, this is very far from the truth. it is possible to make extremely complex applications with Flash. And when there is a kind of "dispute" between<span id="more-538"></span> <del datetime="2010-02-25T08:55:46+00:00">AJAX X FLASH</del> <del datetime="2010-02-25T09:33:04+00:00">Flash x Silverlight</del> Flash x HTML5. From time to time there is a new "Flash-killer", I think they are different technologies and complement. I see the same kind of radicalism in relation to PHP X Cold Fusion, ASP X PHP, PHP X PHYTON, Open Source X  Proprietary etc.<br />
I have also been very radical, defending PHP tooth and nail, spoke ill of any other language that was not PHP without even know it, but I realized that those who still think that way, limits their opportunities to major world today no matter what tool you use but how you use the tool, who heard "The bad employee blames his tools work"?.<br />
Always worked with Flash and PHP, when I entered the BANCOOB, I felt compelled to learn Java, was a challenge that could overcome. Shortly after I entered the migration project, which would have to program in C # and Visual Basic, many of my friends simply do not accept into the project. I heard things like, "look at my curriculum and see if it is VB" and called the loose, but the end result was a great experience for me, I was able to grow much.<br />
I have already been many philosophical discussions, and today I have no more patience for it when I see that this conversation tends to radicalism or religion, I lose the will to fully discuss.<br />
Working with Flash since version 5, I followed closely the development of the tool, and the long ceased to be just a "plugin" to become a development platform for several devices. Of course with that, disrespect the competition, which is great. After all we must always move.</p>
<blockquote><p>
Developers who do not work with Flash, underestimate the power he has.
</p></blockquote>
<p>I'm not the only one who thinks this story that "one will replace the other" makes no sense, to own Adobe preaches that the two work perfectly together, so that the <a href="http://www.youtube.com/watch?v=v69S22ZBBqA&#038;feature=player_embedded">Adobe Dreamweaver CS5 already has support HTML5</a>.<br />
The launch of the iPad was the trigger for the so-called "anti-Flash". it mounted the perfect setting for a healthy discussion, where we could point out the strengths and weaknesses of a given technology and how it can be improved. But what we have seen is just the opposite, I've seen several articles and comments from people simply saying "I hate Flash", <a href="http://tecnologia.terra.com.br/interna/0,,OI4239996-EI4799,00-Adobe+usa+pornografia+para+criticar+Apple+e+iPad.html">sites with sensational headlines</a>(<a href="http://theflashblog.com/?p=1703">what they did to the post of Lee was disgusting!!!</a>), <a href="http://blogs.adobe.com/jnack/2010/02/adobe_is_sabotaging_html5.html">Each week a different rumor that people believe without checking the sources</a> and the same conversation 5 years ago.</p>
<p>Meanwhile, the client ta little matter if you use this tool or that, what matters to him is that you do the job.</p>
<blockquote><p>
The bad employee blames his tools work.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/02/25/radicalism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Camp Brasil = Success!!!</title>
		<link>http://www.leonardofranca.com/index.php/2010/01/18/flash-camp-brasil-sucess/</link>
		<comments>http://www.leonardofranca.com/index.php/2010/01/18/flash-camp-brasil-sucess/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 14:49:32 +0000</pubDate>
		<dc:creator>Leonardo França</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Media Server]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.leonardofranca.com/?p=531</guid>
		<description><![CDATA[
			
				
			
		
The event was unprecedented in Brazil, the Flash Camp Brasil, occurred in the last days 15 and 16 in Maceió, Brazil.
To begin with, was an adventure can go to the event, with tickets and expensive hotel crowded, but it is something that would not miss for the world.
I was staying in a hostel and lucky [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F01%2F18%2Fflash-camp-brasil-sucess%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.leonardofranca.com%2Findex.php%2F2010%2F01%2F18%2Fflash-camp-brasil-sucess%2F&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><div id="attachment_592" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.leonardofranca.com.br/wp-content/uploads/2010/01/18012010001.jpg"><img src="http://www.leonardofranca.com.br/wp-content/uploads/2010/01/18012010001-300x225.jpg" alt="Flash Camp Brasil - I've been there!!!" title="18012010(001)" width="300" height="225" class="size-medium wp-image-592" /></a><p class="wp-caption-text">Flash Camp Brasil - I've been there!!!</p></div><br />
The event was unprecedented in Brazil, the <a href="http://www.flashcampbrasil.com.br/">Flash Camp Brasil</a>, occurred in the last days 15 and 16 in Maceió, Brazil.<br />
To begin with, was an adventure can go to the event, with tickets and expensive hotel crowded, but it is something that would not miss for the world<span id="more-531"></span>.<br />
I was staying in a hostel and lucky for me, on the morning of day 15, shared a post from the street, and my notebook with a damaged battery, I decided to go to the hotel of the event to familiarize myself with the way.<br />
The path to the hostel to the hotel was closer than imagined, having only to wait anxiously for 7 hours until the event start.<br />
While waiting and sitting on the couch with a provision making(ufa!!!), reunion the Gabriela Zaninetti, Marketing Manager of Adobe Systems Brasil, soon after going to the place of lecture and mini-courses, met <a href="http://www.actioncriacoes.net/portfolio/">Demian Borba</a> was already in full swing in the last preparations for the event and introduced me to <a href="http://www.lipao.com.br/">Filipe Cunha</a> of Globo.com, sorry that did not to attend the mini-course it. Who was it was also <a href="http://www.pedrotaranto.com.br/">Pedro Taranto</a>(we almost ran into the airport).<br />
Shortly after the Gabi introduced me to <a href="http://www.fmanzi.com.br/">Fabricio Manzi</a>, guy who knew the years and only in the event I can finally meet you in person. Then I had the opportunity to meet <a href="http://www.vorttice.com">Tiago Venegas</a>, with whom he later exchanged ideas on Flash Media Server, Cássio Souza, Technical Director <a href="www.gringo.nu">Gringo</a> and Diego of <a href="http://www.coc.com.br">COC</a>, after some talk time, arrives<a href="http://www.igorcosta.com/blog/">Igor Costa</a>, another so that the web and knew I had the opportunity to meet personally, I played a little Mortal Kombat vs DC Comics and took a beating by <a href="http://www.netoleal.com.br/">Neto Leal</a>.<br />
A few minutes before the event, entering the auditorium, reunion the <a href="http://theflashblog.com/">Lee</a> with whom I had a quick conversation about our trips were.<br />
In between I had the opportunity to meet <a href="http://www.becklog.org/">Beck Novaes,</a> in which I showed a bit of a speech that would do the next day. At the end of the event, I know <a href="http://www.brunoribeiro.net/">Bruno Ribeiro</a> who told me about the project that won the mini ignite.</p>
<p><strong>About the sessions</strong><br />
<strong>First day</strong><br />
Well, full auditorium, all fully prepared and Demian opened the event with an exciting presentation on <a href="http://www.efmexperience.com">EFM</a> and how did your dream to make a Flash Camp in Brazil.</p>
<p><a href="http://www.bigspaceship.com">Joshua Hirsch</a> Minister of Technology of the Big Spaceship, commented on how your company works and has demonstrated some very interesting projects in which the developer program so even in the latest stage of the project, first you need to buy a machine to smoke.</p>
<p>The second lecture was the <a href="http://www.32bits.com.br">Daniel Morena</a> Creative Director of the Agency 32 Bits, about 1.0 Enhanced Reality, that really surprised me, systems showed he made a few years with the Flash Platform using multitouch when not imagined that. I could personally give my congratulations to Daniel Morena.</p>
<p><strong>Second day</strong><br />
O segundo dia se iniciou com a palestra do <a href="http://www.blog.rivello.org/">Sam Rivello</a>, CEO of <a href="http://www.rivellomultimediaconsulting.com">RMC</a>, biology compared with programming, demonstrated in a simple and objective simulation of biological behavior in programming in Flex 4.</p>
<p>The second lecture was that of Igor Costa, and relaxed and animated, it showed 40 differences considered significant change between Flex 3 and Flex 4.</p>
<p>Tiago Venegas began his lecture by explaining what's new in Flash Media Server 3.5, demonstrated vorttice, a tool conference that owes nothing to the Adobe Connect, also shown as is done dynamic stream. </p>
<p>Next, Lee explained some news about Flash Player 10.1 and created an example using the Adobe Flash CS5 exporting directly to a native application for IPhone.</p>
<p>The presentation of Cássio Souza began with a story about how the way you work in, then explained design pattern <a href="http://github.com/cassiozen/AS3-State-Machine">State Machine</a>. You may have used State Machine and did not know.</p>
<p><a href="http://www.danieldura.com/">Daniel Dura</a> told the story of the multitouch and demonstrated how it can be worked in Flash Platform. </p>
<p>The talk of closure of the event was dedicated to the Beck Novaes about OutBox, and in my opinion, was closed on a high note, was simply fantastic, I think one of the best speeches of the event. </p>
<p>This was a summary on how fast it was my adventure in Flash Camp Brasil and the ultimate feeling is that it was very worthwhile, Maceió was perfect for the event and a cry marked the Flash Camp Brasil: "<strong>sa porra!!!</strong>".</p>
<p>See more pictures:<br />
<a href="http://www.garagem.com.br/novo_garagem/eventos/flashweb/1024/index.php?cd_evento=1227">http://www.garagem.com.br/novo_garagem/eventos/flashweb/1024/index.php?cd_evento=1227</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardofranca.com/index.php/2010/01/18/flash-camp-brasil-sucess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
