<?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>polyGeek.com</title>
	<atom:link href="http://polygeek.com/feed" rel="self" type="application/rss+xml" />
	<link>http://polygeek.com</link>
	<description>polyGeek (noun) person with many geek related talents.</description>
	<lastBuildDate>Fri, 11 May 2012 20:45:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Reposition an AIR app to last position ( Everyone remember where we parked )</title>
		<link>http://polygeek.com/5058_adobe-air_reposition-an-air-app-to-last-position-everyone-remember-where-we-parked</link>
		<comments>http://polygeek.com/5058_adobe-air_reposition-an-air-app-to-last-position-everyone-remember-where-we-parked#comments</comments>
		<pubDate>Fri, 11 May 2012 20:45:04 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=5058</guid>
		<description><![CDATA[One of the current client projects I&#8217;m working on is an AIR desktop app. The client wants the app to remember the position &#8211; screen coordinates &#8211; that it was...]]></description>
			<content:encoded><![CDATA[<p>One of the current client projects I&#8217;m working on is an AIR desktop app. The client wants the app to remember the position &#8211; screen coordinates &#8211; that it was in when the user closed the app so that it can be positioned in the same place next time the app is launched.</p>
<p>This is easily accomplished but requires a bit of a hack.</p>
<p>Firstly, you need to listen for the MOVE event on the nativeWindow.</p>
<pre>nativeWindow.addEventListener( NativeWindowBoundsEvent.MOVE, onAppMoved );</pre>
<p>Then when it moves you store the nativeWindow.x/y coordinates in a local database. Super easy, right? Oh, wait a second. The nativeWindow.x/y coordinates might report back incorrectly. You see, when the app starts up it&#8217;s going to reposition itself which means the nativeWindow will move twice. Once for the x-update and once for the y-update. Trouble is that when the onAppMoved event handler fires the nativeWindow.x/y won&#8217;t be accurate. You need to wait.</p>
<p>The hack I used was to set up a Timer and reset(); start(); every time the onAppMoved event is fired. The Timer waits 250 milliseconds &#8211; plenty of time to get it right &#8211; and then stores the coordinates. When the Timer handler finally does fire then I stop the Timer.</p>
<p>The added bonus is that when the user is dragging the app around you won&#8217;t be updating your local database 100+ times as the onAppMove handler is firing over and over while the app moves. Now it will only fire after a 250 millisecond delay is reached between move events. Which is likely to be when the user stops dragging the app around.</p>
<p>Fortunately I haven&#8217;t noticed this issue with the app reporting it&#8217;s width/height as the app is resized.</p>
<p><a href="http://polygeek.com/5058_adobe-air_reposition-an-air-app-to-last-position-everyone-remember-where-we-parked" rel="bookmark">Reposition an AIR app to last position ( Everyone remember where we parked )</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on May 11, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/5058_adobe-air_reposition-an-air-app-to-last-position-everyone-remember-where-we-parked/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Random Walk in Away3D 4.0</title>
		<link>http://polygeek.com/5044_away3d_random-walk-in-away3d-4-0</link>
		<comments>http://polygeek.com/5044_away3d_random-walk-in-away3d-4-0#comments</comments>
		<pubDate>Thu, 03 May 2012 08:00:04 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Mathematical Algorithms]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=5044</guid>
		<description><![CDATA[I don&#8217;t know what it is but I just love the patterns, or lack of patterns, in a random walk. Especially when it&#8217;s done in 3D. It sort of reminds...]]></description>
			<content:encoded><![CDATA[<div id="attachment_5055" class="wp-caption alignright" style="width: 260px"><a href="http://polygeek.com/wp-content/uploads/2012/05/5044_random-walk.png" rel="shadowbox[sbpost-5044];player=img;"><img class="size-full wp-image-5055" title="5044_random-walk" src="http://polygeek.com/wp-content/uploads/2012/05/5044_random-walk.png" alt="Random Walk in 3D" width="250" height="131" /></a><p class="wp-caption-text">Random Walk in 3D</p></div>
<p>I don&#8217;t know what it is but I just love the patterns, or lack of patterns, in a random walk. Especially when it&#8217;s done in 3D. It sort of reminds me of a complex protein molecule folding up on itself. At any rate it&#8217;s fun and easy to play around with and so I thought I&#8217;d update my old random walk done in Away3D 3.6 with a new one done with Away3D 4.0 beta.</p>
<p>The only real difference with this one is that I added a nifty little option to fade the color of the line segments from blue to red along the path.</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_RndWalk_489735481"
			class="flashmovie"
			width="550"
			height="700">
	<param name="movie" value="http://polygeek.com/away3d/5044_random-walk/RndWalk.swf" />
	<param name="wmode" value="direct" />
	<param name="allowfullscreen" value="true" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://polygeek.com/away3d/5044_random-walk/RndWalk.swf"
			name="fm_RndWalk_489735481"
			width="550"
			height="700">
		<param name="wmode" value="direct" />
		<param name="allowfullscreen" value="true" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></td>
</tr>
<tr>
<td align="center"><a href="http://polygeek.com/away3d/5044_random-walk/RndWalk.as" target="code">view source</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Note: The text input on the NumericStepper doesn&#8217;t work in fullscreen. I&#8217;m really looking forward to <a href="http://renaun.com/blog/2012/04/using-fullscreen-interactive-and-mouse-lock-in-flash-player-11-3/">Using Fullscreen Interactive and Mouse Lock in Flash Player 11.3</a>.</p>
<p><a href="http://polygeek.com/5044_away3d_random-walk-in-away3d-4-0" rel="bookmark">Random Walk in Away3D 4.0</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on May 3, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/5044_away3d_random-walk-in-away3d-4-0/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mathematical representation of the Apache Flex Logo in Away3D</title>
		<link>http://polygeek.com/5028_away3d_apache-flex-logo-away-3d</link>
		<comments>http://polygeek.com/5028_away3d_apache-flex-logo-away-3d#comments</comments>
		<pubDate>Tue, 01 May 2012 16:59:22 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Away3D 4.0]]></category>
		<category><![CDATA[Mathematical Algorithms]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=5028</guid>
		<description><![CDATA[I don&#8217;t know about you but I love the new Apache Flex logo. And when I saw it I couldn&#8217;t help but see that the shape was similar to a...]]></description>
			<content:encoded><![CDATA[<div id="attachment_5030" class="wp-caption alignright" style="width: 210px"><a href="http://polygeek.com/wp-content/uploads/2012/05/5028_Flex-rose.png" rel="shadowbox[sbpost-5028];player=img;"><img class="size-full wp-image-5030" title="5028_Flex-rose" src="http://polygeek.com/wp-content/uploads/2012/05/5028_Flex-rose.png" alt="Flex Rose" width="200" height="200" /></a><p class="wp-caption-text">r = 2.0 + ( 1.6 * Math.cos( i * 4 ) );</p></div>
<p>I don&#8217;t know about you but I love the new Apache Flex logo. And when I saw it I couldn&#8217;t help but see that the shape was similar to a <a href="http://en.wikipedia.org/wiki/Rose_%28mathematics%29" target="_blank">mathematical Rose</a>. So of course I spent way, WAY, too much time futzing around with values until I could create a rough representation using Away3D 4.0.</p>
<p>If your curious the Apache Flex logo = 2.0 + 1.6 * Math.cos( i * 4 );</p>
<p>Creating the shape of the logo was pretty easy. But getting the colors to change the way they do took a chunk of work. I went through a handful of different approaches until I finally settled on what you see. It isn&#8217;t exact but you get the idea, right?</p>
<p>This was also my first expedition into the land of Away3D 4.0 beta. Quite a bit different than 3.6. I&#8217;m looking forward to spending some good quality time with 4.0 and redoing a lot of my previous work done in 3.6 including my entire Away3D 101 series. Converting everything over will be a good exercise in understanding the changes between the two versions of Away3D.</p>
<p>&nbsp;</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_FlexRose_1216926156"
			class="flashmovie"
			width="550"
			height="700">
	<param name="movie" value="http://polygeek.com/flex/5028_Flex-rose/FlexRose.swf" />
	<param name="wmode" value="direct" />
	<param name="allowfullscreen" value="true" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://polygeek.com/flex/5028_Flex-rose/FlexRose.swf"
			name="fm_FlexRose_1216926156"
			width="550"
			height="700">
		<param name="wmode" value="direct" />
		<param name="allowfullscreen" value="true" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object></td>
</tr>
<tr>
<td align="center"><a href="http://polygeek.com/flex/5028_Flex-rose/FlexRose.as" target="code">view source</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Here&#8217;s the official Apache Flex logo so you can compare and see how close I got.</p>
<div id="attachment_5036" class="wp-caption aligncenter" style="width: 301px"><a href="http://polygeek.com/wp-content/uploads/2012/05/ApacheFlexLogo.jpg" rel="shadowbox[sbpost-5028];player=img;"><img class="size-full wp-image-5036" title="ApacheFlexLogo" src="http://polygeek.com/wp-content/uploads/2012/05/ApacheFlexLogo.jpg" alt="Apache Flex Logo" width="291" height="173" /></a><p class="wp-caption-text">The new, and much improved, Apache Flex logo.</p></div>
<p>I&#8217;m continually amazed that such beautiful objects can be created through such simple code. The shape is created with one very simple line of code:</p>
<pre>_r = 2.0 + 1.6 * Math.cos( i * 4 );</pre>
<p>While that creates the shape it takes another line of code to create the spiral effect is the line wraps around and around:</p>
<pre>_r += _r + 0.6 * Math.cos( _r ) + ( i / twoPi ) / 20;</pre>
<p>That one took a bit of futzing with to get the spiral to be the way you see.</p>
<p>By turning the constants into variables that can be changed via a slider you can play around and get lots of variations on the shape of the rose. Have fun.</p>
<p>FYI, when you&#8217;re playing around with Away3D and you can&#8217;t get it to work in your browser then remember to set wmode=direct. That&#8217;s probably the thing you forgot. I know I did. :-)</p>
<p><a href="http://polygeek.com/5028_away3d_apache-flex-logo-away-3d" rel="bookmark">Mathematical representation of the Apache Flex Logo in Away3D</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on May 1, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/5028_away3d_apache-flex-logo-away-3d/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The end is nigh, or is it? Adobe charges developers to make Flash content</title>
		<link>http://polygeek.com/5018_adobeflash_the-end-is-nigh-or-is-it-adobe-charges-developers-to-make-flash-content</link>
		<comments>http://polygeek.com/5018_adobeflash_the-end-is-nigh-or-is-it-adobe-charges-developers-to-make-flash-content#comments</comments>
		<pubDate>Wed, 28 Mar 2012 17:33:39 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=5018</guid>
		<description><![CDATA[Maybe you caught the news already: Adobe is going to start charging developers to make Flash content. Obviously this will only hasten the end of the Flash Player, right? Think...]]></description>
			<content:encoded><![CDATA[<p>Maybe you caught the news already: <a href="http://www.adobe.com/devnet/flashplayer/articles/premium-features.html" target="_blank">Adobe is going to start charging developers to make Flash content</a>. Obviously this will only hasten the end of the Flash Player, right?</p>
<p>Think again. If you read the details &#8211; <a href="http://www.adobe.com/devnet/flashplayer/articles/premium-features-licensing-faq.html" target="_blank">here&#8217;s the FAQ</a> -  it will affect a vanishingly small percentage of developers. Actually, you should count your blessings if it affects you as a developer because it means that your game/app is a monetary success!</p>
<p>Here are the details, and I&#8217;ll use small words so that tech reporters are sure to understand ( Yeah, I&#8217;m talking to you <a href="http://news.cnet.com/8301-30685_3-57405606-264/adobe-to-charge-flash-coders-to-use-premium-features/" target="_blank">Stephen Shankland of CNET</a>. )</p>
<p>First, there is a totally new feature added to the Flash Player 11.2 and AIR: Domain Memory. Domain Memory makes it possible to run existing C/C++ code bases within Flash Player.  Do you need to have a license to use that? No. It&#8217;s free for everyone to jump in and use without restriction and without a license.</p>
<p>Second, Stage3D &#8211; that&#8217;s hardware accelerated graphics &#8211; came out for the Flash Player last year and now it&#8217;s available for AIR. You can use Stage3D in your apps/games without restriction and without a license.</p>
<p>If you use both Domain Memory and Stage3D together then you need to have a license. But you still don&#8217;t pay a dime for it. You only pay if your app/game makes over $50,000. So basically that&#8217;s big companies that have dozens of developers working on a single project and spend millions in development anyway.</p>
<p>Oh, but wait, there&#8217;s more &#8211; or less in this case. This doesn&#8217;t apply to apps/games deployed to mobile markets. Got it? You can use both Domain Memory and Stage3D together in a mobile app/game without license or restriction and make a million dollars and keep every penny &#8211; except the 30% that Apple/Google take.</p>
<p>So do you really think this will impact you? Please, in your dreams. But I hope it does and for me as well. I would love to have a game that makes $50,000+, wouldn&#8217;t you? Except that I have no intention of making a desktop game and besides that I don&#8217;t have a million lines of C/C++ code laying around that I need to use Domain Memory.</p>
<p>You might be thinking, &#8220;Sure, I won&#8217;t use these particular features but what if Adobe starts charging for other things that I do want to use?&#8221; In this case you&#8217;re right. <a href="http://www.adobe.com/devnet/flashplayer/articles/premium-features-licensing-faq.html#g" target="_blank">Adobe does plan on adding more <em>Premium Features</em></a>. And that&#8217;s fine. The features they are targeting are things that would be insanely useful to large scale apps/games. Stuff that if you had to create it on your own might take months, or years, of development. If Adobe drops code in that solves your problem then why not try to make a dime off of the people who make lots of money from it? Adobe isn&#8217;t a charity just handing out code like it was free to create.</p>
<p><strong>&lt;soapBox&gt;</strong></p>
<p>Please give me a moment to vent here. Tech reporters in general are idiotic, deceiving, pond scum. Anyone with a brain could read the Adobe press release and see that this isn&#8217;t big news to hardly anyone. But do they write it like that? No. They write things to be inflammatory. They want comments and they want people to share their article. People don&#8217;t share news that is accurately reported to not be big news. They share things that inflame their already preconceived prejudices.</p>
<p>This is bad enough in the tech world. But in the <em>real news</em> it is quite harmful. News is twisted and miss-represented to such a degree that it&#8217;s hard to know what&#8217;s really going on today. It&#8217;s like the headlines of &#8220;Obama is makes free speech a federal offense.&#8221; Does that sound like something you should read? Yes. Is it accurate? No. The people who are spewing that crap would be silent as mice if it were a Republican president in the oval office right now. And here&#8217;s some news for you: YOUR Republican Congress passed the damn bill so STFU.</p>
<p>Anyhow, I would like to see legislation passed that made it a criminal offense to miss-represent the news. At the very least when an agency does this sort of thing and then is found guilty of lying to the public they should be forced to spend just as much time announcing their <em>error</em> as they did reporting the error in the first place. And not at 3AM either. If FOX News reports something during prime time that is found to be in error then they must report their error during prime time. That goes for everyone. I only use FOX News because they are the most egregious violators of fair and accurate news outside of China.</p>
<p><strong>&lt;/soapBox&gt;</strong></p>
<p><a href="http://polygeek.com/5018_adobeflash_the-end-is-nigh-or-is-it-adobe-charges-developers-to-make-flash-content" rel="bookmark">The end is nigh, or is it? Adobe charges developers to make Flash content</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on March 28, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/5018_adobeflash_the-end-is-nigh-or-is-it-adobe-charges-developers-to-make-flash-content/feed</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Flash Builder debugging tip: say goodby to Inaccessible Members</title>
		<link>http://polygeek.com/5011_flash-builder_flash-builder-debugging-tip-say-goodby-to-inaccessible-members</link>
		<comments>http://polygeek.com/5011_flash-builder_flash-builder-debugging-tip-say-goodby-to-inaccessible-members#comments</comments>
		<pubDate>Wed, 21 Mar 2012 23:10:31 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flash Builder tips]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=5011</guid>
		<description><![CDATA[You know how when you&#8217;re debugging in Flash Builder and  you pause to inspect variables at a break point but there&#8217;s all this clutter of properties like _1106363674length, _1621195650device_info, and...]]></description>
			<content:encoded><![CDATA[<p>You know how when you&#8217;re debugging in Flash Builder and  you pause to inspect variables at a break point but there&#8217;s all this clutter of properties like _1106363674length, _1621195650device_info, and crap like getting in the way of the nice, clean, useful info like length, device_info, etc?</p>
<div id="attachment_5013" class="wp-caption aligncenter" style="width: 559px"><a href="http://polygeek.com/wp-content/uploads/2012/03/5011_un-usefulCrap.png" rel="shadowbox[sbpost-5011];player=img;"><img class="size-full wp-image-5013" title="5011_un-usefulCrap" src="http://polygeek.com/wp-content/uploads/2012/03/5011_un-usefulCrap.png" alt="un-useful crap" width="549" height="768" /></a><p class="wp-caption-text">This crap just looks like a mess and gets in the way.</p></div>
<p>Well low-and-behold there is a way to get rid of that and I feel like a fool for not looking/finding this sooner. All you have to do is click on the little little down-arrow at the upper-right corner of the <em>variables</em> panel then select Flex -&gt; Show Inaccessible Member Variables.</p>
<p><a href="http://polygeek.com/wp-content/uploads/2012/03/5011_uncheck-this.png" rel="shadowbox[sbpost-5011];player=img;"><img class="aligncenter size-full wp-image-5014" title="5011_uncheck-this" src="http://polygeek.com/wp-content/uploads/2012/03/5011_uncheck-this.png" alt="uncheck this" width="485" height="276" /></a></p>
<p>Now your panel should look more like this &#8211; most of the time.</p>
<div id="attachment_5015" class="wp-caption aligncenter" style="width: 559px"><a href="http://polygeek.com/wp-content/uploads/2012/03/5011_usefulCrap.png" rel="shadowbox[sbpost-5011];player=img;"><img class="size-full wp-image-5015" title="5011_usefulCrap" src="http://polygeek.com/wp-content/uploads/2012/03/5011_usefulCrap.png" alt="Useful crap" width="549" height="648" /></a><p class="wp-caption-text">Useful Crap</p></div>
<p>Now the question is why is the checked by default? I&#8217;m sure there&#8217;s a reason and I&#8217;m some people need this checked but I&#8217;ve never, not once, needed to look at the inaccessible variables.</p>
<p>Note: this doesn&#8217;t always work. I&#8217;ve seen other variables that still show the inaccessible members but at least this fixes it most of the time.</p>
<p><a href="http://polygeek.com/5011_flash-builder_flash-builder-debugging-tip-say-goodby-to-inaccessible-members" rel="bookmark">Flash Builder debugging tip: say goodby to Inaccessible Members</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on March 21, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/5011_flash-builder_flash-builder-debugging-tip-say-goodby-to-inaccessible-members/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Video Course: Build Mobile Apps in a Flash!</title>
		<link>http://polygeek.com/5004_flex_video-course-build-mobile-apps-in-a-flash</link>
		<comments>http://polygeek.com/5004_flex_video-course-build-mobile-apps-in-a-flash#comments</comments>
		<pubDate>Tue, 20 Mar 2012 01:36:21 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[Book Review]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AIR mobile]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=5004</guid>
		<description><![CDATA[Drew Falkman &#8211; an Adobe Certified Professional &#8211; pointed me to his 7 chapter video course: Build Mobile Apps in a Flash! The series will teach you how to build...]]></description>
			<content:encoded><![CDATA[<p>Drew Falkman &#8211; an Adobe Certified Professional &#8211; pointed me to his 7 chapter video course: <a href="http://www.udemy.com/build-mobile-apps-in-a-flash/" target="_blank">Build Mobile Apps in a Flash</a>! The series will teach you how to build mobile apps for iOS (iPhone, iPad, and iPod Touch), Google Android and even Blackberry&#8217;s Tablet OS using Apache Flex and Adobe AIR. The series is amazingly thorough starting from the very basics for those that are unfamiliar with Flash Builder or MXML and going all the way through building and deploying apps to the various marketplaces.</p>
<p>The series is $39 which is a bargain conconsidering the depth and range of materials. But just in case there is a 30-day money back guarantee on the course so you have nothing to lose. However, I doubt if anyone would want their money back for something this well done.</p>
<p>Head on over and check it out. You can get the first 2 sessions free to see if you like it. The original price was $99. If the price happens to go back up then use this code to get the discount back to to $39: INTRO39.</p>
<p><a href="http://polygeek.com/5004_flex_video-course-build-mobile-apps-in-a-flash" rel="bookmark">Video Course: Build Mobile Apps in a Flash!</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on March 19, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/5004_flex_video-course-build-mobile-apps-in-a-flash/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrolling to the end of a Spark List</title>
		<link>http://polygeek.com/4949_flex_scrolling-to-the-end-of-a-spark-list</link>
		<comments>http://polygeek.com/4949_flex_scrolling-to-the-end-of-a-spark-list#comments</comments>
		<pubDate>Thu, 12 Jan 2012 05:57:33 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=4949</guid>
		<description><![CDATA[Trying to get a &#60;s:List&#62; to instantly scroll to the bottom kicked my ass for hours. I tried various hacks. Googled everything I could think of. Learned a lot in...]]></description>
			<content:encoded><![CDATA[<p>Trying to get a &lt;s:List&gt; to instantly scroll to the bottom kicked my ass for hours. I tried various hacks. Googled everything I could think of. Learned a lot in the process except how to get a damn &lt;s:List&gt; to scroll to the bottom. Eventually hit upon the perfect solution &#8211; search the flexponential.com website. Because if there&#8217;s an answer to a tough Flex/Spark question it&#8217;s probably there somewhere.</p>
<p>Here&#8217;s what Steven Shongrunden at flexponential.com came up with:</p>
<pre>private function scrollToBottom():void {
	// update the verticalScrollPosition to the end of the List
	// virtual layout may require us to validate a few times
	var delta:Number = 0;
	var count:int = 0;
	while (count++ &lt; 10){
		chatList.validateNow();
		delta = chatList.layout.getVerticalScrollPositionDelta(NavigationUnit.END);
		list.layout.verticalScrollPosition += delta;

		if (delta == 0)
			break;
	}
}</pre>
<p>Steven is an engineer on the Flex SDK team so it&#8217;s not going to get any better than this. Visit <a href="http://flexponential.com/2011/02/13/scrolling-to-the-bottom-of-a-spark-list/" target="_blank">Scrolling to the bottom of a spark List</a> to get the details directly from the developers blog. I know this stumped me and a few people on Twitter for a few days so it can&#8217;t hurt to give this a little more attention.</p>
<p>Hopefully we&#8217;ll have a <em>scrollToBottom</em> method on the &lt;s:List&gt; component someday that will do this without the need for this hack.</p>
<p>And their post on <a href="http://flexponential.com/2010/12/05/saving-scroll-position-between-views-in-a-mobile-flex-application/" target="_blank">Saving scroll position between views in a mobile Flex Application</a> is also a nice gem to read.</p>
<p><a href="http://polygeek.com/4949_flex_scrolling-to-the-end-of-a-spark-list" rel="bookmark">Scrolling to the end of a Spark List</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on January 11, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/4949_flex_scrolling-to-the-end-of-a-spark-list/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Unable to download APK files from your server</title>
		<link>http://polygeek.com/4986_air-mobile_unable-to-download-apk-files-from-your-server</link>
		<comments>http://polygeek.com/4986_air-mobile_unable-to-download-apk-files-from-your-server#comments</comments>
		<pubDate>Wed, 11 Jan 2012 09:00:52 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[AIR Mobile]]></category>
		<category><![CDATA[AIR mobile]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=4986</guid>
		<description><![CDATA[If you want to put your .apk files up on your server, like I often do, so that friend/family can download and test for you &#8211; suckers &#8211; then you...]]></description>
			<content:encoded><![CDATA[<p>If you want to put your .apk files up on your server, like I often do, so that friend/family can download and test for you &#8211; suckers &#8211; then you might run into an issue with mime-types like I did. Every time I tried to download the .apk file I got a &#8220;unable to download file&#8221; error on my phone.  Fortunately the solution is very simple. Just create a .htaccess file and place it in the folder where your .apk lives and place the following text in the file:</p>
<pre>AddType application/vnd.android.package-archive apk</pre>
<p>The file should download fine after that.</p>
<p><a href="http://polygeek.com/4986_air-mobile_unable-to-download-apk-files-from-your-server" rel="bookmark">Unable to download APK files from your server</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on January 11, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/4986_air-mobile_unable-to-download-apk-files-from-your-server/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Adding scrollbars to a mobile List component</title>
		<link>http://polygeek.com/4945_adobe-air_adding-scrollbars-to-a-mobile-list-component</link>
		<comments>http://polygeek.com/4945_adobe-air_adding-scrollbars-to-a-mobile-list-component#comments</comments>
		<pubDate>Tue, 10 Jan 2012 09:00:12 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIR Mobile]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=4945</guid>
		<description><![CDATA[I&#8217;m working on an AIR app that is meant for both desktop and mobile devices. ( No it&#8217;s not the 360&#124;Flex app. I just used that as an example to...]]></description>
			<content:encoded><![CDATA[<p><a href="http://polygeek.com/wp-content/uploads/2011/12/4945_mobile-list-with-scrollbar.png" rel="shadowbox[sbpost-4945];player=img;"><img class="alignright size-medium wp-image-4947" title="4945_mobile-list-with-scrollbar" src="http://polygeek.com/wp-content/uploads/2011/12/4945_mobile-list-with-scrollbar-179x300.png" alt="360Flex Speakers List" width="179" height="300" /></a>I&#8217;m working on an AIR app that is meant for both desktop and mobile devices. ( No it&#8217;s not the 360|Flex app. I just used that as an example to help pimp the best developer conference in the world! )  I started with a Flex Mobile project but there are a few modifications that need to be made to some of the mobile components to accommodate the expected UX when using a mouse. The most obvious of which is scroll bars for the &lt;s:List&gt; component.</p>
<p>In a mobile app we don&#8217;t expect to see scroll bars except when actively scrolling. But with a mouse driven app we expect there to be scroll bars at all times if scrolling is an option.</p>
<p>Fortunately it is very simple to add scroll bars to something like the &lt;s:List&gt; component. All you need to do is set  <em>interactionMode=&#8221;mouse&#8221;.</em></p>
<p>Actually it&#8217;s not that simple. That will give you a scroll bar with just the <em>thumb</em> visible. And it&#8217;s the mobile scroll bar thumb so it&#8217;s very thin. Not at all useful with a mouse. You&#8217;ll need to change the skinClass for the scroll bar as well. <em></em></p>
<p>The &lt;s:List&gt; ends up looking something like this:</p>
<pre>&lt;s:List
	id="list"
	width="100%" height="100%"
	labelField="name"
	interactionMode="mouse"
	creationComplete="{ list.scroller.verticalScrollBar.setStyle(
				'skinClass', skins.VScrollbar_skin ); }"&gt;

	&lt;s:ArrayList&gt;
		&lt;fx:Object name="Brent Arnold" /&gt;
		&lt;fx:Object name="Bryce Barrand" /&gt;
				.
				.
				.
	&lt;s:layout&gt;
		&lt;s:VerticalLayout horizontalAlign="contentJustify" /&gt;
	&lt;/s:layout&gt;

&lt;/s:List&gt;</pre>
<p><a href="/flex/4945_mobile-list-with-scrollbar/polyGeek_ListScroll.zip" target="_blank">You can download an example app with the custom scrollbar skin here</a>.</p>
<p>More information about mobile scroll bars</p>
<ul>
<li>flexponential &gt; <a href="http://flexponential.com/2011/07/30/controlling-scroll-bar-visibility-in-a-mobile-scroller/" target="_blank">Controlling scroll bar visibility in a mobile Scroller</a></li>
<li>help.adobe &gt; <a href="http://help.adobe.com/en_US/flex/mobileapps/WSd81c90855964c1b7-1588dc2312aa4a673bf-7fff.html" target="_blank">Considerations when using scroll bars in a mobile application</a></li>
<li>opensource.adobe &gt; <a href="http://opensource.adobe.com/wiki/display/flexsdk/Mobile+List,+Scroller+and+Touch" target="_blank">Mobile List, Scroller and Touch &#8211; Functional and Design Specification</a></li>
</ul>
<p><a href="http://polygeek.com/4945_adobe-air_adding-scrollbars-to-a-mobile-list-component" rel="bookmark">Adding scrollbars to a mobile List component</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on January 10, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/4945_adobe-air_adding-scrollbars-to-a-mobile-list-component/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Saving remote images locally in an AIR app</title>
		<link>http://polygeek.com/4965_flex_saving-remote-images-locally-in-an-air-app</link>
		<comments>http://polygeek.com/4965_flex_saving-remote-images-locally-in-an-air-app#comments</comments>
		<pubDate>Thu, 05 Jan 2012 06:20:06 +0000</pubDate>
		<dc:creator>polygeek</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIR Mobile]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[File]]></category>

		<guid isPermaLink="false">http://polygeek.com/?p=4965</guid>
		<description><![CDATA[Very briefly the approach you need to follow is to use the URLLoader class to download the image(s) in question and make sure you set the _urlLoader.dataFormat = URLLoaderDataFormat.BINARY. In...]]></description>
			<content:encoded><![CDATA[<p>Very briefly the approach you need to follow is to use the <em>URLLoader</em> class to download the image(s) in question and make sure you set the <em>_urlLoader.dataFormat = URLLoaderDataFormat.BINARY</em>.</p>
<p>In the Event.COMPLETE event handler you will be able to access the ByteArray data via <em>urlLoader.data</em>. All you need to do is write that to a file: <em>fileStream.writeBytes( loader.data, 0, loader.data.length );</em></p>
<p>I would go into the details of this but <a href="http://cookbooks.adobe.com/post_Local_Copy_of_Remote_Images_in_AIR_for_Android-18191.html" target="_blank">Brian Rinaldi</a> and <a href="http://corlan.org/2008/07/18/air-how-to-save-locally-a-resource-from-web/" target="_blank">Mihai Corlan</a> have both written excellent and concise posts about it.</p>
<p>I&#8217;m only blogging about this because I spent days doing this the wrong way until finally realizing, &#8220;wait a second, this can&#8217;t be right.&#8221; You see I was using the <em>Loader</em> class to download the images. That works of course. But you end up with a Bitmap in the <em>event.target.content</em> and don&#8217;t have access to the actual ByteArray of the image that you downloaded.</p>
<p>That approach is just fine if all you want to do is display an image. But if you want to save it to disk then you have to go through the intermediary step of pulling the ByteArray out of the Bitmap using the <em>JPEGEncoder</em> or <em>PNGEncoder</em>. That is a wasteful step when you can just get the ByteArray data directly using the URLLoader. Plus it can be quite time consuming for large images which will halt your app while it chews on the data.</p>
<p>So thank you Brian and Mihai for showing me the light. :-)</p>
<p><a href="http://polygeek.com/4965_flex_saving-remote-images-locally-in-an-air-app" rel="bookmark">Saving remote images locally in an AIR app</a> originally appeared on <a href="http://polygeek.com">polyGeek.com</a> on January 4, 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://polygeek.com/4965_flex_saving-remote-images-locally-in-an-air-app/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  polygeek.com/feed ) in 0.85803 seconds, on May 17th, 2012 at 5:23 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 17th, 2012 at 6:23 am UTC -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Quick Cache Is Fully Functional :-) ... A Quick Cache file was just served for (  polygeek.com/feed ) in 0.00132 seconds, on May 17th, 2012 at 5:53 am UTC. -->
