<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Thanks, Mister!</title>
	<atom:link href="http://thanksmister.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thanksmister.com</link>
	<description>Flex, AIR, &#38; Android Development Blog</description>
	<lastBuildDate>Thu, 23 Feb 2012 01:26:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='thanksmister.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Thanks, Mister!</title>
		<link>http://thanksmister.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://thanksmister.com/osd.xml" title="Thanks, Mister!" />
	<atom:link rel='hub' href='http://thanksmister.com/?pushpress=hub'/>
		<item>
		<title>Flex Chart DataTip Renderer</title>
		<link>http://thanksmister.com/2012/01/18/flex-chart-datatip-renderer/</link>
		<comments>http://thanksmister.com/2012/01/18/flex-chart-datatip-renderer/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 19:06:25 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Chart]]></category>
		<category><![CDATA[Component]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Spark Skins]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[DataTip]]></category>
		<category><![CDATA[LineChart]]></category>
		<category><![CDATA[ToolTip]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=1894</guid>
		<description><![CDATA[Some code to create custom DataTip renderers for Flex charts using Spark components and containers. Below is a screen shot of the custom DataTip and the source code to create it. Main.mxml DataTipSkin.mxml -Mister<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1894&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some code to create custom DataTip renderers for Flex charts using Spark components and containers. Below is a screen shot of the custom DataTip and the source code to create it. </p>
<p><a href="http://thanksmister.files.wordpress.com/2012/01/cartdatatip.png"><img src="http://thanksmister.files.wordpress.com/2012/01/cartdatatip.png?w=497" alt="" title="CartDataTip"   class="alignnone size-full wp-image-1896" /></a></p>
<p><strong>Main.mxml</strong><br />
<pre class="brush: as3;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:WindowedApplication xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; 
					   xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot; 
					   xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot; 
					   xmlns:charts=&quot;com.thanksmister.charts.*&quot; 
					   width=&quot;480&quot; height=&quot;340&quot;&gt;
	
	&lt;fx:Style source=&quot;assets/css/style.css&quot;/&gt;
	
	&lt;fx:Script&gt;
		&lt;![CDATA[
			import mx.charts.CategoryAxis;
			
			private function categoryAxis_labelFunc(item:Object, prevValue:Object, axis:CategoryAxis, categoryItem:Object):String 
			{
				var datNum:Number = Date.parse(item);
				var tempDate:Date = new Date(datNum);
				
				return dateFormatter.format(tempDate).toUpperCase();
			}
		]]&gt;
	&lt;/fx:Script&gt;
	
	&lt;fx:Declarations&gt;
		&lt;mx:DateFormatter id=&quot;dateFormatter&quot; formatString=&quot;MMMM-DD-YYYY&quot; /&gt;
	
		&lt;s:XMLListCollection id=&quot;dp&quot;&gt;
			&lt;s:source&gt;
				&lt;fx:XMLList&gt;
					&lt;quote date=&quot;8/1/2007&quot; open=&quot;40.29&quot; close=&quot;39.58&quot; /&gt;
					&lt;quote date=&quot;8/2/2007&quot; open=&quot;39.4&quot; close=&quot;39.52&quot; /&gt;
					&lt;quote date=&quot;8/3/2007&quot; open=&quot;39.47&quot; close=&quot;38.75&quot; /&gt;
					&lt;quote date=&quot;8/6/2007&quot; open=&quot;38.71&quot; close=&quot;39.38&quot; /&gt;
					&lt;quote date=&quot;8/7/2007&quot; open=&quot;39.08&quot; close=&quot;39.42&quot; /&gt;
					&lt;quote date=&quot;8/8/2007&quot; open=&quot;39.61&quot; close=&quot;40.23&quot; /&gt;
					&lt;quote date=&quot;8/9/2007&quot; open=&quot;39.9&quot; close=&quot;40.75&quot; /&gt;
					&lt;quote date=&quot;8/10/2007&quot; open=&quot;41.3&quot; close=&quot;41.06&quot; /&gt;
					&lt;quote date=&quot;8/13/2007&quot; open=&quot;41&quot; close=&quot;40.83&quot; /&gt;
					&lt;quote date=&quot;8/14/2007&quot; open=&quot;41.01&quot; close=&quot;40.41&quot; /&gt;
					&lt;quote date=&quot;8/15/2007&quot; open=&quot;40.22&quot; close=&quot;40.18&quot; /&gt;
					&lt;quote date=&quot;8/16/2007&quot; open=&quot;39.83&quot; close=&quot;39.96&quot; /&gt;
					&lt;quote date=&quot;8/17/2007&quot; open=&quot;40.18&quot; close=&quot;40.32&quot; /&gt;
					&lt;quote date=&quot;8/20/2007&quot; open=&quot;40.55&quot; close=&quot;40.74&quot; /&gt;
					&lt;quote date=&quot;8/21/2007&quot; open=&quot;40.41&quot; close=&quot;40.13&quot; /&gt;
					&lt;quote date=&quot;8/22/2007&quot; open=&quot;40.4&quot; close=&quot;40.77&quot; /&gt;
					&lt;quote date=&quot;8/23/2007&quot; open=&quot;40.82&quot; close=&quot;40.6&quot; /&gt;
					&lt;quote date=&quot;8/24/2007&quot; open=&quot;40.5&quot; close=&quot;40.41&quot; /&gt;
					&lt;quote date=&quot;8/27/2007&quot; open=&quot;40.38&quot; close=&quot;40.81&quot; /&gt;
				&lt;/fx:XMLList&gt;
			&lt;/s:source&gt;
		&lt;/s:XMLListCollection&gt;

		&lt;s:SolidColorStroke id=&quot;lineStroke&quot; color=&quot;#CCCCCCC&quot; alpha=&quot;.2&quot; weight=&quot;1&quot;/&gt;
		
	&lt;/fx:Declarations&gt;
	
	&lt;s:VGroup width=&quot;100%&quot; height=&quot;100%&quot; paddingBottom=&quot;10&quot; paddingTop=&quot;10&quot; paddingLeft=&quot;10&quot; paddingRight=&quot;10&quot;&gt;
		
		&lt;mx:LineChart id=&quot;lineChart&quot;
					  showDataTips=&quot;true&quot;
					  dataProvider=&quot;{dp}&quot;
					  width=&quot;100%&quot; gutterRight=&quot;10&quot;
					  height=&quot;100%&quot; 
					  dataTipRenderer=&quot;com.thanksmister.charts.DataTipSkin&quot;&gt;
			
			&lt;!-- vertical axis --&gt;
			&lt;mx:verticalAxis&gt;
				&lt;mx:LinearAxis baseAtZero=&quot;false&quot; title=&quot;Price&quot; /&gt;
			&lt;/mx:verticalAxis&gt;
			
			&lt;!-- horizontal axis --&gt;
			&lt;mx:horizontalAxis&gt;
				&lt;mx:CategoryAxis id=&quot;ca&quot; categoryField=&quot;@date&quot; title=&quot;Date&quot; labelFunction=&quot;categoryAxis_labelFunc&quot; /&gt;
			&lt;/mx:horizontalAxis&gt;
			
			&lt;!-- horizontal axis renderer --&gt;
			&lt;mx:horizontalAxisRenderers&gt;
				&lt;mx:AxisRenderer axis=&quot;{ca}&quot; canDropLabels=&quot;true&quot; /&gt;
			&lt;/mx:horizontalAxisRenderers&gt;
			
			&lt;!-- series --&gt;
			&lt;mx:series&gt;
				&lt;mx:LineSeries yField=&quot;@open&quot; form=&quot;segment&quot; displayName=&quot;Open&quot; /&gt;
			&lt;/mx:series&gt;
			
			&lt;!-- series filters --&gt;
			&lt;mx:seriesFilters&gt;
				&lt;fx:Array/&gt;
			&lt;/mx:seriesFilters&gt;
			
			&lt;!-- assign stroke to grid lines --&gt;
			&lt;mx:backgroundElements&gt;
				&lt;mx:GridLines gridDirection=&quot;both&quot; horizontalChangeCount=&quot;2&quot; verticalChangeCount=&quot;6&quot;&gt;
					&lt;mx:horizontalStroke&gt;{lineStroke}&lt;/mx:horizontalStroke&gt;
					&lt;mx:verticalStroke&gt;{lineStroke}&lt;/mx:verticalStroke&gt;
				&lt;/mx:GridLines&gt;
			&lt;/mx:backgroundElements&gt;
			
			&lt;mx:annotationElements&gt;
				&lt;fx:Array&gt;
					&lt;charts:RangeSelector id=&quot;selectedRange&quot; /&gt;
				&lt;/fx:Array&gt;
			&lt;/mx:annotationElements&gt;
			
		&lt;/mx:LineChart&gt;
		
	&lt;/s:VGroup&gt;
	
&lt;/s:WindowedApplication&gt;
</pre></p>
<p><strong>DataTipSkin.mxml</strong><br />
<pre class="brush: as3;">'
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:Group  xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; 
		 xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;  
		 implements=&quot;mx.core.IFlexDisplayObject, mx.core.IDataRenderer&quot;
		 xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot; width=&quot;120&quot;&gt;
	
	&lt;fx:Script&gt;
		&lt;![CDATA[
			import flashx.textLayout.conversion.TextConverter;
			import flashx.textLayout.elements.TextFlow;
			
			import mx.charts.HitData;
			import mx.charts.series.items.LineSeriesItem;
			
			private var _data:HitData;
			
			[Bindable]
			private var _xValue:String;
			
			[Bindable]
			private var _yValue:String;
			
			[Bindable]
			private var _displayText:TextFlow;
			
			public function get data():Object
			{
				// TODO Auto Generated method stub
				return null;
			}
			
			public function set data(value:Object):void
			{
				// HitData data from chart
				_data = value as HitData;
				
				// The display text used in datatip which comes in HTML format
				_displayText = TextConverter.importToFlow(_data.displayText, TextConverter.TEXT_FIELD_HTML_FORMAT);
				
				// HitData contains a reference to the ChartItem
				var item:LineSeriesItem = _data.chartItem as LineSeriesItem;
				
				// ChartItem xValue and yValue 
				_xValue = String(item.xValue);
				_yValue = String(item.yValue);
			}
		]]&gt;
	&lt;/fx:Script&gt;
	
	&lt;fx:Declarations&gt;
		
	&lt;/fx:Declarations&gt;
	
	&lt;s:Rect right=&quot;0&quot; left=&quot;0&quot; bottom=&quot;0&quot; top=&quot;0&quot;&gt;
		&lt;s:filters&gt;
			&lt;s:DropShadowFilter blurX=&quot;20&quot; blurY=&quot;20&quot; alpha=&quot;0.22&quot; distance=&quot;5&quot; angle=&quot;90&quot; knockout=&quot;false&quot; /&gt;
		&lt;/s:filters&gt;
		&lt;s:fill&gt;
			&lt;s:SolidColor color=&quot;0x393939&quot;/&gt;
		&lt;/s:fill&gt;    
		&lt;s:stroke&gt;
			&lt;s:SolidColorStroke color=&quot;0x1a1a19&quot;  weight=&quot;1&quot; alpha=&quot;.2&quot; /&gt;
		&lt;/s:stroke&gt;
	&lt;/s:Rect&gt;
	
	&lt;s:VGroup width=&quot;100%&quot; height=&quot;100%&quot; paddingTop=&quot;10&quot; paddingRight=&quot;10&quot; paddingBottom=&quot;10&quot; paddingLeft=&quot;10&quot;&gt;
		
		&lt;s:RichEditableText textFlow=&quot;{_displayText}&quot; width=&quot;100%&quot; textAlign=&quot;center&quot; selectable=&quot;false&quot; editable=&quot;false&quot;/&gt;
		
	&lt;/s:VGroup&gt;

&lt;/s:Group&gt;
</pre></p>
<p>-Mister</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1894/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1894/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1894/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1894&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2012/01/18/flex-chart-datatip-renderer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>

		<media:content url="http://thanksmister.files.wordpress.com/2012/01/cartdatatip.png" medium="image">
			<media:title type="html">CartDataTip</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex Spark Rounded Image and Image Button Controls</title>
		<link>http://thanksmister.com/2012/01/17/flex-spark-rounded-image-and-image-button-controls/</link>
		<comments>http://thanksmister.com/2012/01/17/flex-spark-rounded-image-and-image-button-controls/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 19:28:26 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[Spark Skins]]></category>
		<category><![CDATA[Button]]></category>
		<category><![CDATA[Image]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=1877</guid>
		<description><![CDATA[I had the pleasure recently of collaborating with Ken Rogers (@pixels4nickels) on a couple of components. I had the need, and probably everyone has at one time or another, of having a image with rounded corners. My other desire was to have an image behave like a button. So we came up with two components, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1877&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had the pleasure recently of collaborating with Ken Rogers (<a href="pixels4nickels" target="_blank">@pixels4nickels</a>) on a couple of components.  I had the need, and probably everyone has at one time or another, of having a image with rounded corners.  My other desire was to have an image behave like a button.  </p>
<p>So we came up with two components, one is called RoundedImage, this does pretty much what it advertises. It extends the Flex Spark Image control to set a corner radius of the loaded image.  The other component is called ImageButton.  This extends the Spark Button control and loads an image to create a button with rounded corners, pretty straight forward.  </p>
<p>What makes these components nice is that they maintain the aspect ratio of the loaded image by simply setting either a height or width. So if you have a large image and want to scale it proportionally, you just set the width, the height will be scaled maintaining the aspect ratio. If you set both height and width values the loaded image will stretch to fit the dimensions.  </p>
<p>Here is a screen shot of the results when setting with, height, or both:</p>
<p><a href="http://thanksmister.files.wordpress.com/2012/01/screen-shot-2012-01-17-at-11-03-49-am.png"><img src="http://thanksmister.files.wordpress.com/2012/01/screen-shot-2012-01-17-at-11-03-49-am.png?w=497&#038;h=430" alt="" title="ImageButtonImage" width="497" height="430" class="alignnone size-full wp-image-1878" /></a></p>
<p>You can take a look at the code for the Rounded Image and the Image Button at the following Gist links:</p>
<p>Michael Ritchie Gist: <a href="https://gist.github.com/1627989" target="_blank">https://gist.github.com/1627989</a><br />
Ken Rogers Gist: <a href="https://gist.github.com/1625442" target="_blank">https://gist.github.com/1625442</a><br />
Flex FXP File: <a href="http://thanksmr.com/examples/imagebuttons/ImageButtons.fxp">http://thanksmr.com/examples/imagebuttons/ImageButtons.fxp</a></p>
<p>Big thanks to Ken for his help working out all the kinks and keeping it simple!</p>
<p>-Mister</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1877/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1877/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1877/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1877&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2012/01/17/flex-spark-rounded-image-and-image-button-controls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>

		<media:content url="http://thanksmister.files.wordpress.com/2012/01/screen-shot-2012-01-17-at-11-03-49-am.png" medium="image">
			<media:title type="html">ImageButtonImage</media:title>
		</media:content>
	</item>
		<item>
		<title>Determining local timezone in ActionScript (AIR, Flex, AS3)</title>
		<link>http://thanksmister.com/2011/10/06/determining-local-timezone-in-actionscript-air-flex-as3/</link>
		<comments>http://thanksmister.com/2011/10/06/determining-local-timezone-in-actionscript-air-flex-as3/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 22:35:49 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=1848</guid>
		<description><![CDATA[I made a little utility class that determines the local timezone (PST, EST, MST, CST, etc.). The guts of the utility are three methods, one for determining if the local machine is currently observing daylight savings time, another determines the GMT time from the the local machines current Date, and one for looking up the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1848&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I made a little utility class that determines the local timezone (PST, EST, MST, CST, etc.).  The guts of the utility are three methods, one for determining if the local machine is currently observing daylight savings time, another determines the GMT time from the the local machines current Date, and one for looking up the timezone abbreviation by GMT time. This is sort of a conglomerate of code that I could find on different posts and leveraged them to achieve my own goals.</p>
<p>Determining if the daylight savings time is currently being observed.</p>
<p><pre class="brush: as3;">
**
* Determines if local computer is observing daylight savings time for US and London.
* */
public static function isObservingDTS():Boolean
{
     var winter:Date = new Date(2011, 01, 01); // after daylight savings time ends
     var summer:Date = new Date(2011, 07, 01); // during daylight savings time
     var now:Date = new Date();

     var winterOffset:Number = winter.getTimezoneOffset();
     var summerOffset:Number = summer.getTimezoneOffset();
     var nowOffset:Number = now.getTimezoneOffset();

     if((nowOffset == summerOffset) &amp;&amp; (nowOffset != winterOffset)) {
          return true;
     } else {
          return false;
     }
}
</pre></p>
<p>Creating the GMT from a Date object and adjusting for daylight savings time.</p>
<p><pre class="brush: as3;">
/**
* Method to build GMT from date and timezone offset and accounting for daylight savings.
*
* Originally code befor modifications:
* http://flexoop.com/2008/12/flex-date-utils-date-and-time-format-part-i/
* */
private static function buildTimeZoneDesignation( date:Date, dts:Boolean ):String
{
     if ( !date ) {
          return &quot;&quot;;
     }

     var timeZoneAsString:String = &quot;GMT&quot;;
     var timeZoneOffset:Number;

     // timezoneoffset is the number that needs to be added to the local time to get to GMT, so
     // a positive number would actually be GMT -X hours
     if ( date.getTimezoneOffset() / 60 &gt; 0 &amp;&amp; date.getTimezoneOffset() / 60 &lt; 10 ) {
          timeZoneOffset = (dts)? ( date.getTimezoneOffset() / 60 ):( date.getTimezoneOffset() / 60 - 1 );
          timeZoneAsString += &quot;-0&quot; + timeZoneOffset.toString();
     } else if ( date.getTimezoneOffset() &lt; 0 &amp;&amp; date.timezoneOffset / 60 &gt; -10 ) {
          timeZoneOffset = (dts)? ( date.getTimezoneOffset() / 60 ):( date.getTimezoneOffset() / 60 + 1 );
          timeZoneAsString += &quot;+0&quot; + ( -1 * timeZoneOffset ).toString();
     } else {
          timeZoneAsString += &quot;+00&quot;;
     }

     // add zeros to match standard format
     timeZoneAsString += &quot;00&quot;;
     return timeZoneAsString;
}
</pre></p>
<p>Finally, parsing the abbreviation from a simple lookup Array object.</p>
<p><pre class="brush: as3;">
/**
* List of timezone abbreviations and matching GMT times.
* Modified form original code at:
* http://blog.flexexamples.com/2009/07/27/parsing-dates-with-timezones-in-flex/
* */
private static var timeZoneAbbreviations:Array = [
     /* Hawaii-Aleutian Standard/Daylight Time */
     {abbr:&quot;HAST&quot;, zone:&quot;GMT-1000&quot;},
     {abbr:&quot;HADT&quot;, zone:&quot;GMT-0900&quot;},
     /* Alaska Standard/Daylight Time */
     {abbr:&quot;AKST&quot;, zone:&quot;GMT-0900&quot;},
     {abbr:&quot;ASDT&quot;, zone:&quot;GMT-0800&quot;},
     /* Pacific Standard/Daylight Time */
     {abbr:&quot;PST&quot;, zone:&quot;GMT-0800&quot;},
     {abbr:&quot;PDT&quot;, zone:&quot;GMT-0700&quot;},
     /* Mountain Standard/Daylight Time */
     {abbr:&quot;MST&quot;, zone:&quot;GMT-0700&quot;},
     {abbr:&quot;MDT&quot;, zone:&quot;GMT-0600&quot;},
     /* Central Standard/Daylight Time */
     {abbr:&quot;CST&quot;, zone:&quot;GMT-0600&quot;},
     {abbr:&quot;CDT&quot;, zone:&quot;GMT-0500&quot;},
     /* Eastern Standard/Daylight Time */
     {abbr:&quot;EST&quot;, zone:&quot;GMT-0500&quot;},
     {abbr:&quot;EDT&quot;, zone:&quot;GMT-0400&quot;},
     /* Atlantic Standard/Daylight Time */
     {abbr:&quot;AST&quot;, zone:&quot;GMT-0400&quot;},
     {abbr:&quot;ADT&quot;, zone:&quot;GMT-0300&quot;},
     /* Newfoundland Standard/Daylight Time */
     {abbr:&quot;NST&quot;, zone:&quot;GMT-0330&quot;},
     {abbr:&quot;NDT&quot;, zone:&quot;GMT-0230&quot;},
     /* London Standard/Daylight Time */
     {abbr:&quot;BST&quot;, zone:&quot;GMT+0100&quot;},
     {abbr:&quot;GMT&quot;, zone:&quot;GMT+0000&quot;}
];

/**
* Goes through the timze zone abbreviations looking for matching GMT time.
* */
private static function parseTimeZoneFromGMT(gmt:String):String
{
     for each (var obj:Object in timeZoneAbbreviations) {
          if(obj.zone == gmt){
               return obj.abbr;
          }
     }
     return gmt;
}
</pre></p>
<p>This utility is obviously not robust enough to do world timezones, but its enough of a framework to work with if you want to expand past just US timezones (and London).  I am sure there are a lot of different ways this could be improved, so please share resources or ideas if you have them.  You can get the code for the complete utility from GitHub:</p>
<p><a href="http://gist.github.com/1268863">TimzeZoneUtil.as </a></p>
<p>Thanks!</p>
<p>-Mister</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1848/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1848/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1848/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1848&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/10/06/determining-local-timezone-in-actionscript-air-flex-as3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>
	</item>
		<item>
		<title>Truncate Spark Label in the middle and showTruncationTip</title>
		<link>http://thanksmister.com/2011/08/26/truncate-spark-label-in-the-middle-and-showtruncationtip/</link>
		<comments>http://thanksmister.com/2011/08/26/truncate-spark-label-in-the-middle-and-showtruncationtip/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 23:07:39 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[Label]]></category>
		<category><![CDATA[showTruncationTip]]></category>

		<guid isPermaLink="false">http://thanksmister.com/?p=1739</guid>
		<description><![CDATA[Found a little handy customization of the Spark Label control that truncates the label in the middle with a (&#8230;). However it didn&#8217;t show the full label text on roll over when setting the showTruncationTip=&#8221;true&#8221; property of the control. I added a few little lines of code to fix it. The code stores the original [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1739&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Found a little handy customization of the Spark Label control that truncates the label in the middle with a (&#8230;).  However it didn&#8217;t show the full label text on roll over when setting the showTruncationTip=&#8221;true&#8221; property of the control.  I added a few little lines of code to fix it.   </p>
<p>The code stores the original value in a variable called &#8220;_trueText&#8221;, so that just needs to be the value you pass to the toolTip when <strong>showTruncationTip=&#8221;true&#8221;</strong>.  You need to override the mx_internal function to accomplish this. </p>
<p><pre class="brush: as3;">
override mx_internal function setIsTruncated(value:Boolean):void
		{
			if (_isTruncated != value)
			{
				_isTruncated = value;
				if (showTruncationTip)
					toolTip = _isTruncated ? _trueText : null;
				dispatchEvent(new Event(&quot;isTruncatedChanged&quot;));
			}
		}
</pre></p>
<p>Then you need to add one little bit of code in the truncateTextMiddle method that will tell the control that the text is indeed truncated, <strong>setIsTruncated(true);</strong> should be at the end of that method around line 153 in the code snippet below:</p>
<p><pre class="brush: as3;">
	public function truncateTextMiddle(fullText:String, widthToTruncate:Number) : String
		{
			if (!(fullText) || fullText.length &lt; 3 || !this.parent)
			{
				// skip any truncating if no styles (no parent),
				// or text is too small
				return fullText;
			}
			
			// add paddings for some font oversize issues
			var paddingWidth:Number =
				UITextField.mx_internal::TEXT_WIDTH_PADDING +
				this.getStyle(&quot;paddingLeft&quot;) + this.getStyle(&quot;paddingRight&quot;);
			
			// Skip if width is too small
			if (widthToTruncate &lt; paddingWidth + 10) return fullText;
			
			// Prepare measurement object
			// We create new TextField, and copy styles for it from this object
			// We cannot re-use internal original text field instance because
			// it will cause event firing in process of text measurement
			var measurementField:TextField = new TextField();
			
			// Clear so measured text will not get old styles.
			measurementField.text = &quot;&quot;;
			
			// Copy styles into TextField
			var textStyles:UITextFormat = this.determineTextFormatFromStyles();
			measurementField.defaultTextFormat = textStyles;
			var sm:ISystemManager = this.systemManager;
			if (textStyles.font)
			{
				measurementField.embedFonts = sm != null &amp;&amp; sm.isFontFaceEmbedded(textStyles);
			}
			else
			{
				measurementField.embedFonts = false;
			}
			if (textStyles.antiAliasType) {
				measurementField.antiAliasType = textStyles.antiAliasType;
			}
			if (textStyles.gridFitType) {
				measurementField.gridFitType = textStyles.gridFitType;
			}
			if (!isNaN(textStyles.sharpness)) {
				measurementField.sharpness = textStyles.sharpness;
			}
			if (!isNaN(textStyles.thickness)) {
				measurementField.thickness = textStyles.thickness;
			}
			
			// Perform initial measure of text and check if need truncating at all
			
			// To measure text, we set it to measurement text field
			// and get line metrics for first line
			measurementField.text = fullText;
			var fullTextWidth:Number = measurementField.getLineMetrics(0).width + paddingWidth;
			if(fullTextWidth &gt; widthToTruncate){
				// get width of ...
				measurementField.text = &quot;...&quot;;
				var dotsWidth:Number = measurementField.getLineMetrics(0).width;
				
				// Find out what is the half of truncated text without ...
				var halfWidth : Number = (widthToTruncate - paddingWidth - dotsWidth) / 2;
				
				// Make a rough estimate of how much chars we need to cut out
				// This saves steps of character-by-character preocessing
				measurementField.text = &quot;s&quot;;
				var charWidth:Number = measurementField.getLineMetrics(0).width;
				var charsToTruncate:int = Math.round(
					((fullTextWidth - paddingWidth) / 2 - halfWidth) /
					charWidth) + 2;
				
				// allow some distortion to account fractional widths part
				halfWidth = halfWidth - 0.5;
				
				// Below algorithm makes rough middle-truncating
				// Then it is corrected by adding or removing
				// characters for each part until reach required
				// width for each half. Algorith does checks
				// (min max and loop ciodnitions) so that string
				// cannot be less then one character for each half
				
				// see if right part of text approximately fits into half width
				var rightPart:String;
				var widthWithNextChar:Number;
				
				var len:int = fullText.length;
				var currLoc:int = Math.min(len/2 + charsToTruncate + 1, len-1);
				measurementField.text = fullText.substr(currLoc);
				var rightPartWidth:Number = measurementField.getLineMetrics(0).width;
				
				if (rightPartWidth &gt; halfWidth) {
					// throw away characters until fits
					currLoc++;
					while (rightPartWidth &gt; halfWidth &amp;&amp; currLoc &lt; len) {
						measurementField.text = fullText.charAt(currLoc);
						rightPartWidth -= measurementField.getLineMetrics(0).width;
						currLoc++;
					}
					rightPart = fullText.substr(currLoc - 1);
				} else {
					// try to add characters one-by-one and
					// see if it still fits
					widthWithNextChar = 0;
					do {
						currLoc--;
						rightPartWidth += widthWithNextChar;
						measurementField.text = fullText.charAt(currLoc);
						widthWithNextChar = measurementField.getLineMetrics(0).width;
					} while (rightPartWidth + widthWithNextChar &lt;= halfWidth &amp;&amp; currLoc &gt; 0);
					rightPart = fullText.substr(currLoc + 1);
				}
				
				// Do the same with left part, but compare overall string
				// Overall is needed because character-by character
				// would not give us correct total width of string -
				// somehow overall text is measured with sapcers etc. and
				// also there are rounding issues.
				// This way, and by putting left part calculating as last, we allow
				// left part might be larger (may become more than half).
				
				// allow some distortion in widths fractions
				widthToTruncate = widthToTruncate - 0.5 - paddingWidth;
				
				currLoc = Math.max(len/2 - charsToTruncate, 1);
				measurementField.text = fullText.substr(0, currLoc) +
					&quot;...&quot; + rightPart;
				var truncatedWidth:Number = measurementField.getLineMetrics(0).width;
				if (truncatedWidth &gt; widthToTruncate) {
					// throw away characters until fits
					currLoc--;
					while (truncatedWidth &gt; widthToTruncate &amp;&amp; currLoc &gt; 0) {
						measurementField.text = fullText.substr(0, currLoc) +
							&quot;...&quot; + rightPart;
						truncatedWidth = measurementField.getLineMetrics(0).width;
						currLoc--;
					}
					currLoc++;
				} else {
					// try to add characters one-by-one and
					// see if it still fits
					do {
						currLoc++;
						measurementField.text = fullText.substr(0, currLoc) +
							&quot;...&quot; + rightPart;
						widthWithNextChar = measurementField.getLineMetrics(0).width;
					} while (widthWithNextChar &lt;= widthToTruncate &amp;&amp;
						currLoc &lt; len-1);
					currLoc--;
				}

				setIsTruncated(true);
				
				return fullText.substr(0, Math.max(currLoc,1)) +
					&quot;...&quot; + rightPart;
			}
			return fullText;
			
		}
</pre></p>
<p>The original post can be found <a href="http://as3hero.blogspot.com/2011/04/flex-4-truncate-label-in-middle.html" target="_blank">here</a>.</p>
<p>-Mr</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1739/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1739/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1739/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1739&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/08/26/truncate-spark-label-in-the-middle-and-showtruncationtip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom Android TitleBar with Drop Shadow</title>
		<link>http://thanksmister.com/2011/06/06/android-titlebar-drop-shadow/</link>
		<comments>http://thanksmister.com/2011/06/06/android-titlebar-drop-shadow/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 10:33:07 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[LinearLayout]]></category>
		<category><![CDATA[ListAdapter]]></category>
		<category><![CDATA[ListView]]></category>
		<category><![CDATA[TitleBar]]></category>

		<guid isPermaLink="false">http://www.thanksmister.com/?p=1526</guid>
		<description><![CDATA[Recently I ran into a little challenge with some designs for an Android application. The designs called for a drop shadow to appear on the application TitleBar and the footer bar. The drop shadow effect should appear on top of the scrolling list items. However, I learned that with the Android ListView component there is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1526&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I ran into a little challenge with some designs for an Android application. The designs called for a drop shadow to appear on the application TitleBar and the footer bar. The drop shadow effect should appear on top of the scrolling list items. However, I learned that with the Android ListView component there is already an effect called the fading edge. An additional problem is producing a realistic drop shadow effect that appears to float over the items below it rather than take up space between the TitleBar and the ListView.</p>
<p>The first problem, the built in fading edge effect of the ListView makes the list item appear to fade from the screen as it scrolls to the top or bottom of the list. In general this is a nice effect as the ListView produces it’s own shadow and fade as the list is scrolled under the TitleBar. However, this effect clashes with a custom drop shadow effect on the TitleBar because when list items are pressed or selected they produce a slight glow and blur effect at the top/bottom of the list just below the drop shadow. There are two properties of the ListView component that need to be turned “off” for the effects to be removed:</p>
<p><pre class="brush: java;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;ListView
xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
android:layout_height=&quot;fill_parent&quot;
android:layout_width=&quot;fill_parent&quot;
android:cacheColorHint=&quot;#00000000&quot;
android:fadingEdge=&quot;none&quot;/&gt;
</pre></p>
<p><a href="https://gist.github.com/997273" target="_blank">https://gist.github.com/997273</a></p>
<p>The <a href="http://stackoverflow.com/questions/3221119/android-listview-shadow">fadingEdge=”none”</a> setting removes the blurring and fading of list items as they scroll off screen and the cachColorHint=”#0000000″ removes the list from turning black while scrolled even though the background maybe set to be transparent (you can also set a custom list item drawable background to take care of this problem). There is an interesting article about why this effect is part of the ListView component that can be read on the <a href="http://android-developers.blogspot.com/2009/01/why-is-my-list-black-android.html">Android Developer blog</a>.</p>
<p>So now you have a list that has no shadow, fade, or blur effects. To get the shadow to appear to float above the scrolling content I created a a nice drop shadow PNG file in Photoshop with transparent background. I then used the Android <a href="http://developer.android.com/guide/developing/tools/draw9patch.html">Draw 9-Patch</a> tool to make the shadow file scale horizontally across the top and bottom of the application. You now get the following results:</p>
<p><img class="alignnone size-full wp-image-1527" title="customtitlebar" src="http://thanksmister.files.wordpress.com/2011/06/customtitlebar1.png?w=497" alt=""   /></p>
<p>To get the shadow to “float” on top of the ListView, I used a Relative layout to position the items. I also used my own custom TitleBar and ListAdapter in the application to get the desired appearance, as well as added a static footer graphic. What you get a nice drop shadow on the top and bottom of the application that is always on top of the list. This approach as the advantage that the list is underneath the drop shadow not just position below it as it might be if you used a LinearLayout.</p>
<p>You can download the full project code on <a href="http://goo.gl/NPRPy">GitHub</a>.</p>
<p>-Mr</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1526/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1526/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1526/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1526&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/06/06/android-titlebar-drop-shadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>

		<media:content url="http://thanksmister.files.wordpress.com/2011/06/customtitlebar1.png" medium="image">
			<media:title type="html">customtitlebar</media:title>
		</media:content>
	</item>
		<item>
		<title>Remove Underline from Clickable text in TextView on Android</title>
		<link>http://thanksmister.com/2011/05/20/android-remove-underline-from-clickable-text-in-textview/</link>
		<comments>http://thanksmister.com/2011/05/20/android-remove-underline-from-clickable-text-in-textview/#comments</comments>
		<pubDate>Fri, 20 May 2011 11:53:01 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[ClickableSpan]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[SpannableStringBuilder]]></category>
		<category><![CDATA[TextView]]></category>

		<guid isPermaLink="false">http://www.thanksmister.com/?p=1512</guid>
		<description><![CDATA[Been working with the Android SDK (v 2.2) lately and needed to a clickable text area in an TextView but one without any underlined links (so it doesn&#8217;t appear like a hyperlink). I also wanted to capture the click event and launch my own Activity within the same Activty, rather than use something as complicated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1512&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Been working with the Android SDK (v 2.2) lately and needed to a clickable text area in an TextView but one without any underlined links (so it doesn&#8217;t appear like a hyperlink). I also wanted to capture the click event and launch my own Activity within the same Activty, rather than use something as complicated as <a href="http://developer.android.com/reference/android/text/util/Linkify.html">Linkify</a> for this use case.</p>
<p>This example builds the text value for a TextView component dynamically using a <a href="http://developer.android.com/reference/android/text/SpannableStringBuilder.html">SpannableStringBuilder</a>. To create the span for a given length of text, I created a custom class file that extends <a href="http://developer.android.com/reference/android/text/style/ClickableSpan.html">ClickableSpan</a>. This custom class overrides the the &#8220;<a href="http://developer.android.com/reference/android/text/style/ClickableSpan.html#updateDrawState%28android.text.TextPaint%29">updateDrawState</a>&#8221; method and removes the underline. This seems pretty straight forward, but it was not easy assembling all the pieces from various examples to get the results I desired.</p>
<p>Here is a image preview of the application output:</p>
<p><a href="http://thanksmister.files.wordpress.com/2011/05/clickablelink1.png"><img class="alignnone size-full wp-image-1513" title="Clickable Link Example Application Image" src="http://thanksmister.files.wordpress.com/2011/05/clickablelink1.png?w=497" alt=""   /></a></p>
<p>Full Code: <a href="https://gist.github.com/249970d811d84a529d37" target="_blank">https://gist.github.com/249970d811d84a529d37</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1512/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1512/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1512/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1512&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/05/20/android-remove-underline-from-clickable-text-in-textview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>

		<media:content url="http://thanksmister.files.wordpress.com/2011/05/clickablelink1.png" medium="image">
			<media:title type="html">Clickable Link Example Application Image</media:title>
		</media:content>
	</item>
		<item>
		<title>Spark Button and ButtonBar with icons and rollover states</title>
		<link>http://thanksmister.com/2011/04/28/spark-button-two-icon-states/</link>
		<comments>http://thanksmister.com/2011/04/28/spark-button-two-icon-states/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 18:18:44 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[Spark Skins]]></category>
		<category><![CDATA[Button]]></category>
		<category><![CDATA[ButtonBar]]></category>
		<category><![CDATA[ButtonBarButton]]></category>
		<category><![CDATA[Flex 4]]></category>

		<guid isPermaLink="false">http://www.thanksmister.com/?p=1474</guid>
		<description><![CDATA[The Flash Builder Spark Button control doesn’t come with an icon property out of the box. So you have to extend the Button class and add your own. I created a Spark Skin to add two icons to the Button control, one for the up/disabled state and one for the over/down states. The Spark ButtonBar [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1474&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Flash Builder Spark Button control doesn’t come with an icon property out of the box. So you have to extend the Button class and add your own. I created a Spark Skin to add two icons to the Button control, one for the up/disabled state and one for the over/down states.</p>
<p>The Spark ButtonBar control does accommodate an icon, but there is no way to change the icon when the selected index changes. So to change the icon of the selected item, I built a Spark Skin for the ButtonBarButton and the ButtonBar to accomplish the job. Here is the running example of the buttons in action:</p>
<p><a href="http://thanksmr.com/wordpress/wp-content/uploads/2011/04/IconButtons.swf">IconButtons.swf</a></p>
<p>The code of the IconButton class and the IconButtonSkin mxml file that accompanies the class:</p>
<p><a href="https://gist.github.com/946886" target="_blank">https://gist.github.com/946886</a></p>
<p>And the code of the IconButtonBarButton class and the IconButtonBarSkin and IconButtonBarButtonskin mxml</p>
<p><a href="https://gist.github.com/947130" target="_blank">https://gist.github.com/947130</a></p>
<p>You can also download the <a href="http://thanksmr.com/wordpress/wp-content/uploads/2011/04/IconButtons.zip" target="_blank">IconButtons Flash Builder Project</a>.</p>
<p>-Mr</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1474&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/04/28/spark-button-two-icon-states/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>
	</item>
		<item>
		<title>AS3 P2P Helper Class</title>
		<link>http://thanksmister.com/2011/04/15/as3-p2p-helper-class/</link>
		<comments>http://thanksmister.com/2011/04/15/as3-p2p-helper-class/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 18:05:10 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIRAndroid]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[P2P]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://www.thanksmister.com/?p=1453</guid>
		<description><![CDATA[This is just a simple class I created to allow to clients (AIR Desktop, AIR Mobile) to send and receive commands from each other using Flash Player 10 P2P (Peer to Peer). This class is used to drive a AIR application running on a large wall mounted flat screen monitor from an Android mobile device. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1453&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is just a simple class I created to allow to clients (AIR Desktop, AIR Mobile) to send and receive commands from each other using <a href="http://justin.everett-church.com/index.php/2008/05/23/astrop2p/">Flash Player 10 P2P (Peer to Peer)</a>. This class is used to drive a AIR application running on a large wall mounted flat screen monitor from an Android mobile device. These are two different applications but are talking to each other through this common library while connected on the same network.</p>
<p>There is a great little starter video by <a href="http://designupdate.com/blog/2011/03/29/control-a-flash-based-presentation-using-an-android-app/">Paul Trani</a> with CS5. Peter Elst is also working on a P2P library called <a href="http://code.google.com/p/cocoon-p2p/">Cocoon</a> that allows more robust communication. Also check out <a href="http://renaun.com/blog/2011/03/using-macbook-pro-for-airflash-p2p-local-multicast-demos/">Renaun Erickson&#8217;s post</a> for setting up your Mac as a hub for local P2P connections without WiFi.</p>
<p>Full code: <a href="https://gist.github.com/673f0a77f701d4ae98a7" target="_blank">https://gist.github.com/673f0a77f701d4ae98a7</a></p>
<p>-Mister</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1453/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1453&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/04/15/as3-p2p-helper-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>
	</item>
		<item>
		<title>Upload to S3 with cURL and AIR NativeProcess</title>
		<link>http://thanksmister.com/2011/03/16/upload-s3-curl-air-nativeprocess/</link>
		<comments>http://thanksmister.com/2011/03/16/upload-s3-curl-air-nativeprocess/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 03:04:30 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[AIR 2.5]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[NativeProcess]]></category>

		<guid isPermaLink="false">http://www.thanksmister.com/?p=1414</guid>
		<description><![CDATA[This application demonstrates how to upload files to Amazon S3 (part of Amazon Web Services) with cURL from an Adobe AIR application using the AIR 2 NativeProcess API. This application uses the AIR 2.0 or higher SDK, Flash Builder 4, and the cURL native application for uploading files. To use this application also depends on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1414&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This application demonstrates how to upload files to Amazon S3 (part of Amazon Web Services) with cURL from an Adobe AIR application using the AIR 2 NativeProcess API. This application uses the AIR 2.0 or higher SDK, Flash Builder 4, and the cURL native application for uploading files.</p>
<p>To use this application also depends on the <a href="https://github.com/mikechambers/as3corelib">as3corelib</a>, <a href="http://code.google.com/p/as3awss3lib/">as3awss3lib</a>, and <a href="http://code.google.com/p/as3crypto/">as3crypto</a> libraries. You will also need an <a href="http://aws.amazon.com/about-aws/">Amazon S3</a> developer account and have <a href="http://curl.haxx.se/">cURL</a> installed on your system.</p>
<p>Why upload with cURL instead of AIR? Part of the problem with uploading through an AIR application, or any Flash application, is the size limit of the uploads (I think something like 100MB is the recommended size). What happens when you want to upload gigabytes of data? Offloading the uploading of large files to a native process solves this problem. You can also spawn multiple instances of the native process to do multiple uploads. This makes sure your AIR application continues to be responsive and performs well while the uploads happen in the background. Using something like cURL means you have a cross-platform native process that can be installed along with your application.</p>
<p>The main guts of the application revolve around assembling the correct cURL arguments to upload the files to the S3 service. This also requires properly creating an policy expected by S3 to complete the upload process. Here is the core code for creating the S3 policy file and the arguments for cURL:</p>
<p><pre class="brush: as3;">
/**
* Uploads a file to S3 using cURL using the AIR NativeProcess API.
*
* @param file File object
* */
protected function saveFile(folderid:String, file:File):void
{
createProgressPanel(); // add our progress bar

var cURL:File = File.applicationDirectory;

if (Capabilities.os.toLowerCase().indexOf(&quot;win&quot;) &gt; -1) {
cURL = cURL.resolvePath(&quot;bin/curl.exe&quot;);
} else if (Capabilities.os.toLowerCase().indexOf(&quot;mac&quot;) &gt; -1) {
cURL = cURL.resolvePath(&quot;/usr/bin/curl&quot;);
}

var contentType:String = &quot;multipart/form-data&quot;;
var arguments:Vector. = getArguments(&quot;PUT&quot;, folderid, file, contentType);

var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.arguments = arguments;
nativeProcessStartupInfo.executable = cURL;

process = new NativeProcess();
process.addEventListener(ProgressEvent.STANDARD_INPUT_PROGRESS, onInputProgress);
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onStandardOutputData);
process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onStandardErrorData);
process.addEventListener(NativeProcessExitEvent.EXIT, onStandardOutputExit);

process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR, onOutputIOError);
process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onStandardIOError);

process.start(nativeProcessStartupInfo);
}

/**
* Create the native process starupt info arguments. Be sure to check the cURL documentation
* for more functions on upload: http://curl.haxx.se/docs/manual.html
*
* @param method POST or GET arguements
* @param bucketname The S3 bucket name for upload target
* @param file File to upload
* @param contentType The mime type for the upload
* @param secure Boolean value for usting https or http
* @return Vector.
* */
protected function getArguments(method:String, bucketname:String, file:File, contentType:String = &quot;multipart/form-data&quot;, secure:Boolean = false):Vector.
{
var protocol:String = (secure)? &quot;https&quot;:&quot;http&quot;;
var path:String = protocol + &quot;://&quot; + bucketname + &quot;.&quot; + AMAZON_ENDPOINT
var policy:String = getPolicy(bucketname, contentType);

var arguments:Vector. = new Vector.();
arguments.push(&quot;-#&quot;); // gives us a ### % ouput for progress from cURL
arguments.push(&quot;-F key=&quot; + file.name );
arguments.push(&quot;-F AWSAccessKeyId=&quot; + this.accessKey );
arguments.push(&quot;-F policy=&quot; + policy );
arguments.push(&quot;-F signature=&quot; + getSignature( policy) );
arguments.push(&quot;-F Content-Type=&quot; + contentType);
arguments.push(&quot;-F file=@&quot; + file.nativePath);
arguments.push(path);

return arguments;
}

/**
* Creates the policy file for the S3 upload. For more information on AWS policy files:
* http://aws.amazon.com/articles/1434. The paramater content-length-range restricts
* the file upload size. Remove it if you want to have no restrictions on upload size.
* */
protected function getPolicy(bucketname:String, contentType:String):String
{
// date has to be some time in the future so uploads don't expire in progress
var obj:Object = {&quot;expiration&quot;: &quot;2015-06-15T12:00:00.000Z&quot;,
&quot;conditions&quot;: [
{&quot;bucket&quot;: bucketname},
[&quot;starts-with&quot;, &quot;$key&quot;, &quot;&quot;],
[&quot;starts-with&quot;, &quot;$Content-Type&quot;, &quot;&quot;],
[&quot;content-length-range&quot;, 0, 1048576]
]
}

var json:String = JSON.encode(obj);
var encoded: String = Base64.encode(json);

return encoded;
}

/**
* Craete the signature for S3. For more information on S3 signatures:
* http://aws.amazon.com/articles/1434
* */
protected function getSignature(policy:String):String
{
var policyBytes:ByteArray = new ByteArray();
policyBytes.writeUTFBytes(policy);

var secretAccessKeyBytes:ByteArray = new ByteArray();
secretAccessKeyBytes.writeUTFBytes(this.secretAccessKey);

var hmacBytes:ByteArray = hmac.compute(secretAccessKeyBytes, policyBytes);

return Base64.encodeByteArray(hmacBytes);
}
</pre></p>
<p>The tricky part was getting upload feedback from cURL in a format that we could use to display the upload progress. You might notice in the code above that we add an argument to cURL to output a % for uploads in progress. We need to parse this information when it comes back in from the ProgressEvent.STANDARD_ERROR_DATA event of the NativeProcess:</p>
<p><pre class="brush: as3;">
/**
* Handles writing within the process such as percent complete.
* */
protected function onStandardErrorData(event:ProgressEvent):void
{
var output:String = ( process.standardError.readUTFBytes(process.standardError.bytesAvailable) );
var regex:RegExp = /([0-9\.]+)/;
var exec:String = regex.exec(output);

if(exec) {
var arry:Array = exec.split(&quot;,&quot;);
var percent:Number = Math.round(Number(arry[0])); // save percent complete

if(percent &gt; percentComplete) {
percentComplete = percent;
progressBar.setProgress(percentComplete, progressBar.maximum);
}
}
}
</pre></p>
<p>The AIR application installer file and the full code for this example can be found at the GitHub repository:</p>
<p><a href="http://goo.gl/vPmfn">AWSS3cURL</a></p>
<p><strong>Additional Resources</strong><br />
<a href="http://aws.amazon.com/articles/1434?_encoding=UTF8&amp;jiveRedirect=1">Amazon Dev Article on Form Post Upload</a><br />
<a href="https://forums.aws.amazon.com/thread.jspa?threadID=52778">Amazon S3 Forum discussion on cURL</a><br />
<a href="http://curl.haxx.se/">cURL</a><br />
<a href="https://console.aws.amazon.com/s3/home?">Amazon S3 Manager</a></p>
<p>- Mister</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1414/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1414/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1414/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1414&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/03/16/upload-s3-curl-air-nativeprocess/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom AIR Applicaton Updater for Flex 4 with Spark Skins</title>
		<link>http://thanksmister.com/2011/01/20/custom-air-updater-for-flex-4/</link>
		<comments>http://thanksmister.com/2011/01/20/custom-air-updater-for-flex-4/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 06:00:59 +0000</pubDate>
		<dc:creator>thanksmister</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[AIR 2.5]]></category>
		<category><![CDATA[ApplicationUpdater]]></category>
		<category><![CDATA[ApplicationUpdaterUI]]></category>
		<category><![CDATA[Flash Bulder 4]]></category>

		<guid isPermaLink="false">http://www.thanksmister.com/?p=1371</guid>
		<description><![CDATA[In a previous post I laid out the code for a custom application updater for AIR projects. I have since updated that project to work with Flex 4, including Spark controls and skins. It&#8217;s currently skinned to look like the default updater in Flash Builder. I ran into a strange issue when moving the project [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1371&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://thanksmister.com/2009/09/13/custom-air-updater-interface-using-applicationupdater/">previous post</a> I laid out the code for a custom application updater for AIR projects. I have since updated that project to work with Flex 4, including Spark controls and skins. It&#8217;s currently skinned to look like the default updater in Flash Builder.</p>
<p><a href="http://thanksmister.files.wordpress.com/2011/01/screen-shot-2011-01-21-at-4-52-48-pm.png"><img class="alignnone size-full wp-image-1372" title="Screen shot 2011-01-21 at 4.52.48 PM" src="http://thanksmister.files.wordpress.com/2011/01/screen-shot-2011-01-21-at-4-52-48-pm.png?w=497" alt=""   /></a></p>
<p>I ran into a strange issue when moving the project from Flex 3 to Flex 4 (SDK 4.1) and wasn&#8217;t initially able to read the update.xml file that lives on the server. I had to change both the namespace and add &#8220;versionNumber&#8221; to the xml file to work with an AIR 2.5 project.</p>
<p><strong>update.xml</strong></p>
<p><pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;update xmlns=&quot;http://ns.adobe.com/air/framework/update/description/2.5&quot;&gt;
  &lt;versionNumber&gt;2.0.0&lt;/versionNumber&gt;
  &lt;url&gt;app:/server/UpdateTester.air&lt;/url&gt;
  &lt;description&gt;
    &lt;![CDATA[Version 2:
        * Testing the update feature.
        * More testing and bug fixes, bla, bla, bla.]]&gt;
  &lt;/description&gt;
&lt;/update&gt;
</pre></p>
<p>The entire project is on GitHub. Just download and import it into Flash Builder 4. Remember the application won&#8217;t actually update from the IDE, so it will give an error if you try to actually download the update.</p>
<p><a href="http://goo.gl/4TPbI">CustomApplicationUpdate</a></p>
<p>-Mister</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thanksmister.wordpress.com/1371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thanksmister.wordpress.com/1371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/thanksmister.wordpress.com/1371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/thanksmister.wordpress.com/1371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thanksmister.wordpress.com/1371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thanksmister.wordpress.com/1371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thanksmister.wordpress.com/1371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thanksmister.wordpress.com/1371/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thanksmister.com&amp;blog=26538840&amp;post=1371&amp;subd=thanksmister&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://thanksmister.com/2011/01/20/custom-air-updater-for-flex-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ab76e95419f5854ec2b978b8605afc3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">thanksmister</media:title>
		</media:content>

		<media:content url="http://thanksmister.files.wordpress.com/2011/01/screen-shot-2011-01-21-at-4-52-48-pm.png" medium="image">
			<media:title type="html">Screen shot 2011-01-21 at 4.52.48 PM</media:title>
		</media:content>
	</item>
	</channel>
</rss>
