<?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>Ryan Stewart - Mountaineer Coding &#187; Flash</title>
	<atom:link href="http://blog.digitalbackcountry.com/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.digitalbackcountry.com</link>
	<description>Just an average guy trying to drink above average beer.</description>
	<lastBuildDate>Thu, 02 Feb 2012 02:35:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MAX Reflections</title>
		<link>http://blog.digitalbackcountry.com/2011/10/max-reflections/</link>
		<comments>http://blog.digitalbackcountry.com/2011/10/max-reflections/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 23:49:54 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[MAX]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[max2011]]></category>
		<category><![CDATA[nitobi]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2859</guid>
		<description><![CDATA[I&#8217;m sitting down with some tea while my little girl is taking a nap feeling the big exhale from MAX. The energy of the past few days has been largely fantastic and I always find MAX to be rejuvenating both &#8230; <a href="http://blog.digitalbackcountry.com/2011/10/max-reflections/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sitting down with some tea while my little girl is taking a nap feeling the big exhale from MAX. The energy of the past few days has been largely fantastic and I always find MAX to be rejuvenating both from a professional standpoint and a personal standpoint. Getting to connect with the community and my colleagues at Adobe has been great. In the contrast to the buzzing of MAX, the current deep quiet of my house leaves me reflecting a bit on the week.</p>
<p>This will go down as a very transformational MAX. The announcement of the Creative Cloud and the fact that it will include all of Creative Suite Master Collection as well as the touch tools and services (<a href="http://blog.typekit.com/2011/10/03/adobe-acquires-typekit/">including TypeKit</a>) is one of the biggest things I&#8217;ve seen from Adobe in a long time. And it feels like we&#8217;re jumping in with both feet and getting back to the core of what Adobe does: empowering designers to create with great tools. I thought the news about the <a href="http://blogs.adobe.com/digitalpublishing/2011/10/new-adobe-digital-publishing-suite-single-edition-announced.html">single edition of the Digital Publishing suite</a> was a perfect example of that. It makes the blossoming world of digital publishing accessible to more people.</p>
<p>The <a href="http://blogs.nitobi.com/andre/index.php/2011/10/03/nitobi-enters-into-acquisition-agreement-with-adobe/">PhoneGap announcement</a> was, for me, the most significant announcement of the week. By acquiring Nitobi (fantastic guys) and <a href="http://arstechnica.com/open-source/news/2011/10/phonegap-to-become-an-apache-project-as-adobe-acquires-nitobi.ars">contributing the PhoneGap project to the Apache Foundation</a>, Adobe took a huge, huge step into the world of HTML5. It was a perfect way to start a day 2 keynote that focused on the things Adobe is doing to be a part of the HTML5 ecosystem.</p>
<p>Based on the Twitter stream there seemed to be a feeling that the lack of traditional Flash indicated that Adobe is giving up on it. I think that misses the big picture. With the Nitobi acquisition and the embracing of PhoneGap, Adobe is making a significant and meaningful bet on the web and cross-platform mobile applications. This can&#8217;t be overstated. For Flash developers we have AIR, which will let you build cross-platform mobile applications. For HTML developers we have PhoneGap, which will let you create cross-platform mobile applications. Both are web technologies that don&#8217;t require developers to be locked into a specific operating system or type of device. You see the same thing with our digital publishing suite; it doesn&#8217;t matter if you want to deploy on iOS, Android, or PlayBook, you can. And that&#8217;s possible largely because of the web formats that go into creating the DPS apps.</p>
<p>This isn&#8217;t about Flash versus HTML, this is about supporting creative and interactive content across the broadest platform in the world: the web. Whether it&#8217;s mobile apps or browser content; animations, interactive web applications, or 3D gaming experiences, Adobe genuinely believes that the web is the best way for our customers to deliver their creations. By making PhoneGap a cornerstone of our story, I think we&#8217;ve proven our commitment to that mission.</p>
<p>I&#8217;m glad I was at MAX to see all of this in person.</p>
<p><strong>Edit:</strong> This is a <a href="http://www.eweek.com/c/a/Application-Development/Adobe-We-Love-Flash-and-HTML5-Equally-279478/">great piece by Daryl Taft of eWeek</a> that talks about Flash and HTML. And it&#8217;s great to see that the &#8220;and not or&#8221; message is getting picked up. But what I like about this particular message is that when you follow it upstream a bit more, it just means we love the web. And if that&#8217;s the case (and I feel like it is) then the technology becomes secondary to the goals of helping people create cross-os and cross-device content with web technologies.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/10/max-reflections/" data-text="MAX Reflections" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/10/max-reflections/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/10/max-reflections/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Flash Player 11, AIR 3, and Flex/Flash Builder 4.6</title>
		<link>http://blog.digitalbackcountry.com/2011/09/flash-player-11-air-3-and-flexflash-builder-4-6/</link>
		<comments>http://blog.digitalbackcountry.com/2011/09/flash-player-11-air-3-and-flexflash-builder-4-6/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 04:46:04 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[stage3d]]></category>
		<category><![CDATA[starling]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2849</guid>
		<description><![CDATA[Today is a pretty big day for Adobe developers. We&#8217;re officially announcing Flash Player 11, AIR 3, and Flex 4.6 and Flash Builder 4.6. The bits will be available in early October, but we&#8217;re announcing things today to help provide &#8230; <a href="http://blog.digitalbackcountry.com/2011/09/flash-player-11-air-3-and-flexflash-builder-4-6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today is a pretty big day for Adobe developers. We&#8217;re officially announcing <a href="http://blogs.adobe.com/flashplatform/2011/09/announcing-flash-player-11-and-air-3.html">Flash Player 11, AIR 3</a>, and <a href="http://www.adobe.com/devnet/flex/articles/whats-new-flex-flash-builder-46.html">Flex 4.6 and Flash Builder 4.6</a>. The bits will be available in early October, but we&#8217;re announcing things today to help provide developers with information on what&#8217;s coming. I&#8217;ve been at Adobe for 4 years now and it&#8217;s been a very interesting 4 years as the landscape has evolved. It&#8217;s definitely been an up and down ride for Adobe developers, but the world has never been a better place for interactive developers, and these set of releases provide a ton of functionality aimed at helping Adobe developers <a href="http://www.tricedesigns.com/2011/09/21/flash-player-11-air-3/">create content in the most cutting edge places</a>.</p>
<h2>Gaming</h2>
<p>We&#8217;ve been doing a lot of work to help <a href="http://www.adobe.com/solutions/gaming.html">enable console-esque games on top of the Flash Platform</a>. Flash Player 11 includes Stage3D, which is going to open up a whole new world for game developers. <a href="http://molehill.zombietycoon.com/Game.html">Zombie Tycoon</a> and <a href="http://tankionline.com/en/">Tanki</a> are initial examples of what can be done and I can&#8217;t wait to see what comes of it. I&#8217;m reminded very much of the early days of Flash where a bunch of creative people were given a technology that was pretty open-ended and poked and prodded to create a bunch of very cool things. I think we&#8217;ll see that kind of revolution with Stage3D because of the ubiquity of Flash and the creativity of our developer community. Also in the gaming bucket is a framework we&#8217;re working on called <a href="http://www.starling-framework.org/">Starling</a>, which leverages Stage3D to create a super-fast way of doing parts of 2D games. It&#8217;s a great merger between the underlying technology/performance benefits of Stage3D and the kinds of things people want to do in 2D games. I think it&#8217;s also going to see some traction beyond games as agencies start to use it to enhance 2D content.</p>
<h2>Mobile Applications</h2>
<p>Flex and AIR have really found a great place in mobile applications. The performance enhancements in 2.7 made building native-experiences with AIR possible and we&#8217;ve seen some great examples of that in action including <a href="http://itunes.apple.com/us/app/machinarium/id459189186?mt=8">Machinarium</a> and <a href="http://itunes.apple.com/ie/app/caltrain-times/id461248412?mt=8">Caltrain Times</a>. I&#8217;ve been impressed with performance on my <a href="http://itunes.apple.com/us/app/100-days-of-exercise/id463564825?mt=8">100 Days of Exercise</a> application on iOS. I&#8217;m incredibly, incredibly excited by what this means for Flash. There&#8217;s a definite need to create mobile apps that can be deployed to multiple application stores. The Flash Platform provides a way to create great looking, high-design applications with near-native performance that can run on multiple devices. That&#8217;s a big deal.</p>
<p>And this release of AIR 3 goes where we haven&#8217;t gone before on the Flash Platform with native extensions. Now if there are features that aren&#8217;t included in AIR, <a href="http://renaun.com/blog/2011/09/why-native-extensions-for-air/">like access to a credit card reader</a>, you can build those extensions in native code and then link them to your AIR applications and leverage those libraries. It&#8217;s a great mix of native for specific use cases and AIR/Flash for fantastic user interfaces. It&#8217;s a big, big, big deal to be able to extend the platform and it&#8217;s a huge step.</p>
<p>I also think we have one of the best mobile-tool chains out there. Flash Builder 4.6 is going to help with creating those native extensions while also enabling the use of captive runtime in AIR so your applications don&#8217;t need to rely on the external AIR runtime on Android. Combine that with the <a href="http://www.adobe.com/devnet/flex/articles/whats-new-flex-flash-builder-46.html">enhancements that are coming in Flex 4.6</a> and it adds up to a world class mobile development platform that lets you reach more devices that matter. Flex 4.6 is especially exciting because of the new components that have been added. Flex and AIR are far and away the best toolset for interactive developers or any mobile developer who needs to create content for multiple devices. The apps you can build with Flex and AIR are going to stand out from the boring, standard apps that have started to litter app stores. Creativity will win the day and creativity is at the core of Flex/AIR.</p>
<h2>Beyond</h2>
<p>So this is a huge release, and I&#8217;m excited. But I&#8217;m also excited about the future of Adobe and how we are responding and will continue to respond to the evolving marketplace. As Danny Winokur, VP and GM of the Flash Platform, <a href="http://news.cnet.com/8301-30685_3-20106977-264/adobe-flash-will-flourish-despite-windows-8/">said recently</a>:</p>
<blockquote><p>
&#8220;We&#8217;re not so concerned about what the right technology is for that as long as we&#8217;ll be able to deliver those experiences. We&#8217;re working with Microsoft and other members of the HTML community including Google, Apple, and others to enable rich experiences on HTML5.&#8221;</p></blockquote>
<p>This is not a technology war. Adobe is about enabling developers to build the best possible experiences with the technology they want. We want to build tools and services that cater to that ethos. That takes the form of cutting-edge gaming features like Stage3D and world-class mobile app features with Flex, AIR and Flash Builder. But HTML5 is exciting for a lot of reasons, and Adobe will help developers there as well. If you&#8217;re an interactive developer, the future is very, very bright for you.</p>
<p>So you better get a good pair of sunglasses.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/09/flash-player-11-air-3-and-flexflash-builder-4-6/" data-text="Flash Player 11, AIR 3, and Flex/Flash Builder 4.6" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/09/flash-player-11-air-3-and-flexflash-builder-4-6/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/09/flash-player-11-air-3-and-flexflash-builder-4-6/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Implications of Every Flash Developer Being a Mobile Developer</title>
		<link>http://blog.digitalbackcountry.com/2011/04/the-implications-of-every-flash-developer-being-a-mobile-developer/</link>
		<comments>http://blog.digitalbackcountry.com/2011/04/the-implications-of-every-flash-developer-being-a-mobile-developer/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 04:52:50 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2755</guid>
		<description><![CDATA[There&#8217;s an article in the Wall Street journal today about the demand and insufficient supply of mobile developers, which is becoming a huge problem for companies as mobile strategy becomes more and more critical. One of the main problems, as &#8230; <a href="http://blog.digitalbackcountry.com/2011/04/the-implications-of-every-flash-developer-being-a-mobile-developer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s an article in the Wall Street journal today about the <a href="http://online.wsj.com/article/SB10001424052748704547604576263200170918660.html">demand and insufficient supply of mobile developers</a>, which is becoming a huge problem for companies as mobile strategy becomes more and more critical. One of the main problems, as the WSJ draws out, is that these mobile platforms are relatively new so it&#8217;s tough to find developers with a lot of experience. Many companies are turning to good developers and retraining them as mobile developers to fill demand.</p>
<blockquote>
<p>If a software engineer doesn&#8217;t have mobile experience, the company has sometimes been willing to spend several weeks training the engineer to work on mobile platforms, Mr. Rosenthal said.</p>
<p>Given the mismatch between supply and demand, many companies say they have no choice but to retrain software engineers in the art of mobile development. In the last year, Major League Baseball&#8217;s Internet company MLB.com nearly doubled the number of mobile engineers it has to 19, said MLB.com CEO Bob Bowman.</p>
</blockquote>
<p>I thought this article was a perfect complement to the <a href="http://www.adobe.com/devnet/flex/articles/mobile-development-flex-flashbuilder.html">announcement this week of Flash Builder 4.5 and Flex 4.5</a>, which are focused explicitly on helping Flex developers build applications for mobile devices like iOS, Android, and the PlayBook. There is obviously huge demand for mobile applications, and because of scarce supply and experience, existing developers are going to have to think about how they can gain mobile experience. Flex mobile does a fantastic job of making that learning curve smaller by letting Flex developers use what they already know and providing some key mobile features (like ViewNavigator for managing views, the ActionBar for managing global navigation, etc) so that they can quickly turn out Flex applications for these mobile devices.</p>
<p>If you&#8217;re a Flash or Flex developer, then with AIR for mobile devices and Flex 4.5, you&#8217;ve got the skills to go out and build applications for the biggest platforms. That&#8217;s a huge advantage to you as a developer and for any developer who doesn&#8217;t want to get locked into a specific platform. As the chart below shows, there are a lot of people looking for experts in iPhone, Android, and BlackBerry, but there are a lot more people who are looking for Flash experts. With this release, you get the best of both worlds.</p>
<div style="width:540px">
<a href="http://www.indeed.com/jobtrends?q=android%2C+flash%2C+iPhone%2C+blackberry" title="android, flash, iPhone, blackberry Job Trends"><br />
<img width="540" height="300" src="http://www.indeed.com/trendgraph/jobgraph.png?q=android%2C+flash%2C+iPhone%2C+blackberry" border="0" alt="android, flash, iPhone, blackberry Job Trends graph"><br />
</a></p>
<table width="100%" cellpadding="6" cellspacing="0" border="0" style="font-size:80%">
<tr>
<td><a href="http://www.indeed.com/jobtrends?q=android%2C+flash%2C+iPhone%2C+blackberry">android, flash, iPhone, blackberry Job Trends</a></td>
<td align="right"><a href="http://www.indeed.com/q-Android-jobs.html">Android jobs</a> &#8211; <a href="http://www.indeed.com/q-Flash-jobs.html">Flash jobs</a> &#8211; <a href="http://www.indeed.com/q-iPhone-jobs.html">iPhone jobs</a> &#8211; <a href="http://www.indeed.com/q-Blackberry-jobs.html">Blackberry jobs</a></td>
</tr>
</table>
</div>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/04/the-implications-of-every-flash-developer-being-a-mobile-developer/" data-text="The Implications of Every Flash Developer Being a Mobile Developer" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/04/the-implications-of-every-flash-developer-being-a-mobile-developer/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/04/the-implications-of-every-flash-developer-being-a-mobile-developer/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Adobe SXSW Roundup</title>
		<link>http://blog.digitalbackcountry.com/2011/03/adobe-sxsw-roundup/</link>
		<comments>http://blog.digitalbackcountry.com/2011/03/adobe-sxsw-roundup/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 22:28:23 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[adobesxsw]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2736</guid>
		<description><![CDATA[If you haven&#8217;t been to SXSW, as a geek, you need to go at least once. The badge is pretty cheap for what you get, and the experience is unreal. As I&#8217;ve gone to SXSW I find myself going to &#8230; <a href="http://blog.digitalbackcountry.com/2011/03/adobe-sxsw-roundup/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t been to SXSW, as a geek, you need to go at least once. The badge is pretty cheap for what you get, and the experience is unreal. As I&#8217;ve gone to SXSW I find myself going to fewer and fewer panels, but there is always very good content. And the subject matter is incredibly diverse so you can geek out on everything from development to food. But the best part is connecting with people. One of the best things about SXSW is that everyone there is happy to talk to you about anything. There are always a few people who came to pitch their stuff, but even they&#8217;re fun to talk about and the enthusiasm they have is infectious. We held some Adobe events at breakfast and lunch and I got to meet some really fun people who were jazzed about what Adobe is doing.</p>
<p>We also had our crack video team at the event and they did a ton of video. To get a feel for what it was like at SXSW, check out the videos below. And hopefully we&#8217;ll see you there next year. Big thanks to the Edge team, and the CS marketing team for putting on some great Adobe events at SXSW this year.</p>
<p><object width="425" height="256"><param name="movie" value="http://images.tv.adobe.com/swf/player.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="FlashVars" value="fileID=9349&amp;context=58&amp;embeded=true&amp;environment=production"></param><embed src="http://images.tv.adobe.com/swf/player.swf" flashvars="fileID=9349&amp;context=58&amp;embeded=true&amp;environment=production" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="256"></embed></object></p>
<p>There&#8217;s a cool video about the <a href="http://tv.adobe.com/watch/adobe-at-sxsw/adobe-presents-sxsw-interactive-awards/">Interactive Web Awards</a>, which we sponsor and some of the winners and how they use Adobe tools. Some of the finalists for these awards are amazingly impressive.</p>
<p>We also snuck some of the next-gen features in Flash Professional and Dreamweaver and did a couple of videos of feedback from the people that came to the session. You can find <a href="http://tv.adobe.com/watch/adobe-at-sxsw/part-1-future-technologies-from-adobe-at-sxswi-2011/">Part 1</a> here and <a href="http://tv.adobe.com/watch/adobe-at-sxsw/part-2-future-technologies-from-adobe-at-sxswi-2011/">Part 2</a> here.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/03/adobe-sxsw-roundup/" data-text="Adobe SXSW Roundup" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/03/adobe-sxsw-roundup/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/03/adobe-sxsw-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Refresh &#8211; Australia, Seoul, Hong Kong and Singapore</title>
		<link>http://blog.digitalbackcountry.com/2011/02/adobe-refresh-australia-seoul-hong-kong-and-singapore/</link>
		<comments>http://blog.digitalbackcountry.com/2011/02/adobe-refresh-australia-seoul-hong-kong-and-singapore/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 04:40:06 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[MAX]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[australia]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[hong kong]]></category>
		<category><![CDATA[korea]]></category>
		<category><![CDATA[refresh]]></category>
		<category><![CDATA[singapore]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2728</guid>
		<description><![CDATA[I&#8217;m really excited to be joining up with the crew for Adobe Refresh, which will cover some of the latest and greatest features for the Flash Platform as well as show off Adobe&#8217;s HTML story over a couple of weeks &#8230; <a href="http://blog.digitalbackcountry.com/2011/02/adobe-refresh-australia-seoul-hong-kong-and-singapore/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
<p>I&#8217;m really excited to be joining up with the crew for <a href="http://www.adobe.com/au/special/adoberefresh2011/">Adobe Refresh</a>, which will cover some of the latest and greatest features for the Flash Platform as well as show off Adobe&#8217;s HTML story over a couple of weeks in March. We&#8217;re hitting a total of 6 cities in Australia, Hong Kong, Seoul, and Singapore. I&#8217;ll be tagging along with <a href="http://blogs.adobe.com/rgalvan/">Richard Galvan</a>, <a href="http://www.mad.com.au/blog/">Paul Burnett</a>, and <a href="http://blogs.adobe.com/ozcreativepro/">Michael Stoddart</a>.</p>
<p><a href="http://www.adobe.com/au/special/adoberefresh2011/index.html?showtab=tab_agenda">The sessions</a> are going to cover Flash Pro, HTML5, Flex/Flash Builder, Digital Publishing, and a Q&#038;A for answering any questions you might have about the Adobe stack. Plus we&#8217;ll be showing off some things that most people won&#8217;t have seen live yet, so if you come, you&#8217;ll get a first crack at seeing some very cool stuff coming up from Adobe.</p>
<p>Here&#8217;s the full list of cities:</p>
<ul>
<li><a href="http://www.adoberegoready.com/refresh2011/?v=Brisbane&#038;mboxsession=1298261876307-12375">March 1 &#8211; Brisbane, Australia</a></li>
<li><a href="http://www.adoberegoready.com/refresh2011/?v=Sydney&#038;mboxsession=1298261876307-12375">March 2 &#8211; Sydney, Australia</li>
<li><a href="http://www.adoberegoready.com/refresh2011/?v=Melbourne&#038;mboxsession=1298261876307-12375">March 3 &#8211; Melbourne, Australia</li>
<li><a href="http://www.adobe.com/kr/special/adoberefresh2011/agenda.html">March 7 &#8211; Seoul, Korea</a></li>
<li><a href="http://www.adobe.com/hk_en/special/adoberefresh2011/?promoid=IJCES">March 9 &#8211; Hong Kong, China</a></li>
<li>March 10 &#8211; Singapore</li>
</ul>
<p>I&#8217;m looking forward to being able to see all of the community members in those countries as well as getting to show off the latest and greatest with the Flash Platform. I&#8217;ll be talking about multiscreen development with Flex and Flash Builder and there is some VERY good stuff for developers on the horizon when it comes to building apps across devices. This will be a great event to see it all come together.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/02/adobe-refresh-australia-seoul-hong-kong-and-singapore/" data-text="Adobe Refresh - Australia, Seoul, Hong Kong and Singapore" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/02/adobe-refresh-australia-seoul-hong-kong-and-singapore/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/02/adobe-refresh-australia-seoul-hong-kong-and-singapore/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Using The PlayBook AIR SDK with Flex &#8220;Hero&#8221; Mobile Projects</title>
		<link>http://blog.digitalbackcountry.com/2011/01/using-the-playbook-air-sdk-with-flex-hero-mobile-projects/</link>
		<comments>http://blog.digitalbackcountry.com/2011/01/using-the-playbook-air-sdk-with-flex-hero-mobile-projects/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 09:28:07 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[playbook]]></category>
		<category><![CDATA[playbook sdk]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2688</guid>
		<description><![CDATA[When I first started doing PlayBook development with Flash Builder &#8220;Burrito&#8221; I found it kind of confusing how the PlayBook SDK installed itself. During the install process, the PlayBook AIR SDK installer prompts you for two locations; one is the &#8230; <a href="http://blog.digitalbackcountry.com/2011/01/using-the-playbook-air-sdk-with-flex-hero-mobile-projects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I first started doing PlayBook development with Flash Builder &#8220;Burrito&#8221; I found it kind of confusing how the PlayBook SDK installed itself. During the install process, the PlayBook AIR SDK installer prompts you for two locations; one is the location of your Flash Builder installation and the second is an existing AIR 2.5 SDK installation. If you&#8217;re using Burrito, it drops a new SDK into the sdk folder of the Burrito install (<code>blackberry-tablet-sdk-0.9.x</code>) and then defaults to the 4.5.0 sdk in the next screen as the AIR 2.5 SDK.</p>
<p>If you&#8217;re used to doing Android development then the first thing you probably did was go to create a new Flex Mobile or ActionScript Mobile Project using the PlayBook SDK. Unfortunately you&#8217;ll get this screen:</p>
<p><a href="http://blog.digitalbackcountry.com/wp-content/uploads/actionscript_mobile_project.png"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/actionscript_mobile_project.png" alt="" title="actionscript_mobile_project" width="600" height="510" class="aligncenter size-full wp-image-2691" /></a></p>
<p>Luckily, when you selected the existing AIR 2.5 SDK (assuming you put it in the default 4.5.0 folder or any version of the &#8220;Hero&#8221; SDK with mobile components) the PlayBook installer has already linked the PlayBook SDK to that sdk. So when you create a Flex Mobile project with the Flex Hero SDK set you&#8217;ll see the required QNX .swc files already linked:</p>
<p><a href="http://blog.digitalbackcountry.com/wp-content/uploads/linked_swc_files.png"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/linked_swc_files.png" alt="" title="linked_swc_files" width="600" height="813" class="aligncenter size-full wp-image-2690" /></a></p>
<p>But I ran into an issue when I tried to upgrade. My colleague Mihai has a <a href="http://corlan.org/2011/01/13/updating-to-blackberry-tablet-sdk-0-9-2-from-0-9-1/">great runthrough of how to migrate from the 0.9.1 PlayBook SDK to the 0.9.2 SDK</a>. But after I tried to upgrade all of my Flex Hero projects kept referring to the old 0.9.1 SDK. And any new Flex Hero projects I created would reference the old 0.9.1 installation. What I discovered was that something during the install process wasn&#8217;t overwriting the link in the 4.5.0 folder to the old SDK.</p>
<p>It seems like there is a bug that won&#8217;t overwrite the reference to the 0.9.1 correctly but the SDK is referenced in the Flash Builder preferences under Target Platforms. I just had to change it from 0.9.1 to 0.9.2 and all of my old projects as well as all of the new projects started using the new version.</p>
<p><a href="http://blog.digitalbackcountry.com/wp-content/uploads/blackberry_pref.png"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/blackberry_pref.png" alt="" title="blackberry_pref" width="600" height="411" class="aligncenter size-full wp-image-2689" /></a></p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/01/using-the-playbook-air-sdk-with-flex-hero-mobile-projects/" data-text="Using The PlayBook AIR SDK with Flex \"Hero\" Mobile Projects" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/01/using-the-playbook-air-sdk-with-flex-hero-mobile-projects/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/01/using-the-playbook-air-sdk-with-flex-hero-mobile-projects/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Presenting Node.js and Flash at FITC Amsterdam &#8211; Early Bird Ends Friday</title>
		<link>http://blog.digitalbackcountry.com/2011/01/presenting-node-js-and-flash-at-fitc-amsterdam-early-bird-ends-friday/</link>
		<comments>http://blog.digitalbackcountry.com/2011/01/presenting-node-js-and-flash-at-fitc-amsterdam-early-bird-ends-friday/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 02:56:05 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[fitc]]></category>
		<category><![CDATA[fitc amsterdam]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[presentation]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2684</guid>
		<description><![CDATA[If you&#8217;re on the fence for going to FITC Amsterdam you&#8217;re running out of time to lock in the early bird pricing. It ends on Friday, so register now! I&#8217;m going to be presenting on Using Node.js and Flash together &#8230; <a href="http://blog.digitalbackcountry.com/2011/01/presenting-node-js-and-flash-at-fitc-amsterdam-early-bird-ends-friday/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://fitcamsterdam2011.eventbrite.com/"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/fitc_amsterdam_badge.png" alt="FITC Amsterdam 2011" title="fitc_amsterdam_badge" width="303" height="263" class="alignright size-full wp-image-2685" /></a>If you&#8217;re on the fence for going to FITC Amsterdam you&#8217;re running out of time to lock in the early bird pricing. It ends on Friday, <a href="http://fitcamsterdam2011.eventbrite.com/">so register now!</a></p>
<p>I&#8217;m going to be presenting on <a href="http://www.fitc.ca/events/presentations/presentation.cfm?event=115&#038;presentation_id=1453">Using Node.js and Flash together</a> to create real-time, scalable applications using a combination of Flash and JavaScript. <a href="http://nodejs.org/">Node.js</a> has been getting a lot of attention and so it should be a fun session. One of the coolest things this year about FITC is that there will be a ton of diversity in the talks. We&#8217;ve got everything from multi-screen, Flash, HTML5, 3D, gaming, so there really is something for everyone.</p>
<p>It&#8217;s going to be a monumental year for Flash developers with a lot of open questions and some great new technology to play with. FITC Amsterdam will give you some insight into how those technologies can be used and how to navigate the web application landscape.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/01/presenting-node-js-and-flash-at-fitc-amsterdam-early-bird-ends-friday/" data-text="Presenting Node.js and Flash at FITC Amsterdam - Early Bird Ends Friday" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/01/presenting-node-js-and-flash-at-fitc-amsterdam-early-bird-ends-friday/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/01/presenting-node-js-and-flash-at-fitc-amsterdam-early-bird-ends-friday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Custom List Skins for the BlackBerry PlayBook</title>
		<link>http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/</link>
		<comments>http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 10:56:10 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[playbook]]></category>
		<category><![CDATA[qnx]]></category>
		<category><![CDATA[rim]]></category>
		<category><![CDATA[skinning]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2671</guid>
		<description><![CDATA[Disclaimer: I&#8217;m fairly certain this isn&#8217;t best practice. There is a ton of stuff going on with List and CellRenderer that I don&#8217;t fully understand. I&#8217;m hoping to sit down with the QNX team at some point and figure out &#8230; <a href="http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em><strong>Disclaimer</strong>: I&#8217;m fairly certain this isn&#8217;t best practice. There is a ton of stuff going on with <code>List</code> and <code>CellRenderer</code> that I don&#8217;t fully understand. I&#8217;m hoping to sit down with the QNX team at some point and figure out how this might be done correctly, but for now I&#8217;ve found a way that works so I wanted to share it for anyone who is having issues.</em></p>
<p>Skinning a <code>List</code> is quite a bit different than skinning something simple like a <code>Button</code> or a <code>TextInput</code> box (which I talked about in <a href="http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/">my post here</a>). It seems like the correct way to customize the look and feel of a list would be to create a <code>CellRenderer</code> which gives you access to the label for the list, and then swap out the graphics by creating a skin specifically for that <code>CellRenderer</code>. But my particular code didn&#8217;t rely on the label field so I skipped the first step and just created a CellRendererSkin that extends <code>UISkin</code> and implements <code>ICellRenderer</code>. By implementing <code>ICellRenderer</code> I get access to the data methods, but as you&#8217;ll see, that created some issues.</p>
<p>First off, here&#8217;s the list I wanted to create. It&#8217;s got an image and a few lines of text. You can see the regular state (white) and what it looks like when it&#8217;s selected (grey). I wanted a little bit more of a custom look so I put some space between each item and drew a rounded rectangle with a border around the content.</p>
<p><img src="http://blog.digitalbackcountry.com/wp-content/uploads/pintley_list.png" alt="List Screenshot" title="pintley_list" width="398" height="292" class="aligncenter size-full wp-image-2672" /></p>
<p>To skin a list this way, the most important method is still <code>initializeStates()</code>. That method has to be overridden just like if we were skinning any other component, and it&#8217;s where we call <code>setSkinState</code> to associate a graphic with a state. A list has basically 8 different <code>SkinStates</code>: <code>SkinStates.UP, SkinStates.UP_ODD, SkinStates.DOWN, SkinStates.FOCUS, SkinStates.DISABLED, SkinStates.SELECTED, SkinStates.DOWN_SELECTED,<code> and </code>SkinStates.DISABLED_SELECTED</code>.  I have no idea what FOCUS does, I&#8217;m not alternating my rows so I don&#8217;t care about ODD, and I decided I could live with my DOWN, SELECTED, and DOWN_SELECTED being the same. So here&#8217;s the code for my <code>initializeStates()</code> method</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">override protected <span style="color: #000000; font-weight: bold;">function</span> initializeStates<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     _upSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;    
     setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">UP</span>,_upSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
     _downSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;    
     setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">DOWN</span>,_downSkin<span style="color: #66cc66;">&#41;</span>;
     setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">DOWN_SELECTED</span>,_downSkin<span style="color: #66cc66;">&#41;</span>;
     setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">SELECTED</span>,_downSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
     SkinStates              
     showSkin<span style="color: #66cc66;">&#40;</span>_upSkin<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Here&#8217;s where things get a bit messier. With normal skinning, I could just start adding graphics to my sprites and then set the skin state accordingly. But what I found was that when the <code>initializeStates()</code> method got called, the width and height of the component hadn&#8217;t been set yet. So when I tried to draw a rectangle that used the height/width of the component, it would look scrunched. If you know the exact dimensions you want, you can just hard-code the values. But I wanted to be able to use this on different sized lists, so I wanted those dynamic values.</p>
<p>What I found was that if I overrode the <code>setState(state:String)</code> method, I could get the values for width/height there and then   draw the correct graphics depending on whatever state was being set based on the height/width of each cell.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">override protected <span style="color: #000000; font-weight: bold;">function</span> setState<span style="color: #66cc66;">&#40;</span>state:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">super</span>.<span style="color: #006600;">setState</span><span style="color: #66cc66;">&#40;</span>state<span style="color: #66cc66;">&#41;</span>;
&nbsp;
     <span style="color: #000000; font-weight: bold;">var</span> matrix:Matrix = <span style="color: #000000; font-weight: bold;">new</span> Matrix<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
     matrix.<span style="color: #006600;">createGradientBox</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>,<span style="color: #0066CC;">height</span>,<span style="color: #cc66cc;">90</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">*</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
     <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>state == SkinStates.<span style="color: #0066CC;">UP</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#123;</span>                   
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginGradientFill</span><span style="color: #66cc66;">&#40;</span>GradientType.<span style="color: #006600;">LINEAR</span>,
                    <span style="color: #66cc66;">&#91;</span>0xffffff,0xf2f2f2,0xffffff<span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#93;</span>,matrix<span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>,0x221206<span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRoundRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">10</span>,width-<span style="color: #cc66cc;">35</span>,height-<span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">7</span>,<span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
     <span style="color: #66cc66;">&#125;</span>
     <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>state == SkinStates.<span style="color: #0066CC;">DOWN</span> <span style="color: #66cc66;">||</span>
          state == SkinStates.<span style="color: #006600;">DOWN_SELECTED</span> <span style="color: #66cc66;">||</span>
          state == SkinStates.<span style="color: #006600;">SELECTED</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#123;</span>                        
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginGradientFill</span><span style="color: #66cc66;">&#40;</span>GradientType.<span style="color: #006600;">LINEAR</span>,
                    <span style="color: #66cc66;">&#91;</span>0xaaaaaa,0xcfcfcf,0xaaaaaa<span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#93;</span>,matrix<span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>,0x221206<span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRoundRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">10</span>,width-<span style="color: #cc66cc;">35</span>,height-<span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">7</span>,<span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span>;
          _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
     <span style="color: #66cc66;">&#125;</span>              
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Here I ran into another odd issue. Notice that I&#8217;m not adding the graphics to the state, but rather adding them to a <code>_background</code> Sprite. What I found is that when I would try to draw the graphics right on the skin sprite it would either overwrite my other content when the state changed and I couldn&#8217;t get it back, or the graphics wouldn&#8217;t display at all. I&#8217;m still not entirely sure why those two things happened and I went through so many iterations that I don&#8217;t remember the code that caused it. But what I found was that if I created a background Sprite and added that to the display list first, I could alter it depending on the state and it would draw correctly. That&#8217;s also why I have a <code>_background.graphics.clear()</code> call because the <code>_background</code> Sprite is in every state, it just needs to be redrawn when the state changes.</p>
<p>The next step was to add everything to the cell renderer and then to clean it up when the cell renderer goes away. All of the QNX components have an <code>onAdded()</code> and <code>onRemoved()</code> method that gets called when the object is added to or removed from the stage. So I just overrode those methods and added my content.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">override protected <span style="color: #000000; font-weight: bold;">function</span> onAdded<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">super</span>.<span style="color: #006600;">onAdded</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span>_background<span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span>_image<span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_name</span><span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span>_brewery<span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span>_beerType<span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span>_ratingText<span style="color: #66cc66;">&#41;</span>;
     addChild<span style="color: #66cc66;">&#40;</span>_avgRating<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
override protected <span style="color: #000000; font-weight: bold;">function</span> onRemoved<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">super</span>.<span style="color: #006600;">onRemoved</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span>_background<span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span>_image<span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_name</span><span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span>_brewery<span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span>_beerType<span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span>_ratingText<span style="color: #66cc66;">&#41;</span>;
     removeChild<span style="color: #66cc66;">&#40;</span>_avgRating<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>There&#8217;s just one final step. As you&#8217;ll see in my code below, I set up most of the properties of the labels and the image in the constructor. But I don&#8217;t set any of the dynamic data. That&#8217;s because I had a really hard time finding out when I could access the <code>data</code> property of the cell renderer. There isn&#8217;t any data on <code>init(), onAdded(),</code> or <code>initializeStates()</code> so trying to set the dynamic data in those methods threw an error. I <strong>could</strong> access it in the <code>setState()</code> method, but I found that when I tried to set it there, the list wouldn&#8217;t display the values correctly. I finally figured out that it was because of the way the list is virtualized. The <code>setState()</code> method doesn&#8217;t get called when you initially scroll the list because the state hasn&#8217;t changed, just the data has. So I was seeing the values repeat when I&#8217;d scroll the list and didn&#8217;t see the correct value until I clicked on it and forced <code>setState()</code> to be called.</p>
<p>The solution was just to embrace the fact that I was implementing <code>ICellRenderer</code> and set all of the data in the data setter method. That set the data correctly for each cell and didn&#8217;t depend on the state at all. I also had to set the width of the <code>Label</code> objects there so that the text wouldn&#8217;t be cut off.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     _beer = <span style="color: #0066CC;">data</span>;
&nbsp;
     _image.<span style="color: #006600;">setImage</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">thumb</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
     <span style="color: #0066CC;">_name</span>.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">beerName</span>;
     <span style="color: #0066CC;">_name</span>.<span style="color: #0066CC;">width</span> = width-<span style="color: #cc66cc;">150</span>;
&nbsp;
     _brewery.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">brewerName</span>;
     _brewery.<span style="color: #0066CC;">width</span> = width-<span style="color: #cc66cc;">150</span>;
&nbsp;
     _beerType.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">styleName</span>;
     _beerType.<span style="color: #0066CC;">width</span> = width-<span style="color: #cc66cc;">150</span>;
&nbsp;
     <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">avgRating</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#123;</span>
          _avgRatingFormat.<span style="color: #0066CC;">color</span> = 0x4c9d17;
     <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">avgRating</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#123;</span>
          _avgRatingFormat.<span style="color: #0066CC;">color</span> = 0x9d1717;
     <span style="color: #66cc66;">&#125;</span>
&nbsp;
     _avgRating.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">avgRating</span>;
     _avgRating.<span style="color: #006600;">format</span> = _avgRatingFormat;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Again, I want to stress that this probably isn&#8217;t the ideal way to do this. <strong>Especially</strong> if you have a pretty basic label you could just extend <code>CellRenderer</code> and override the <code>draw()</code> and <code>drawLabel()</code> method to do what you want. Or, like I said above, apply a special skin to that <code>CellRenderer</code> that handles all of the states for the list correctly. This was the rabbit hole that I went down though, and I found it to be kind of handy because I killed all of my birds with one class. Even if it&#8217;s an ugly class. Here&#8217;s the full code.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">pintley</span>.<span style="color: #006600;">components</span>.<span style="color: #006600;">listClasses</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">GradientType</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">DropShadowFilter</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Matrix</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
&nbsp;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">display</span>.<span style="color: #006600;">Image</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">listClasses</span>.<span style="color: #006600;">ICellRenderer</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #006600;">SkinStates</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #006600;">UISkin</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">Label</span>;
&nbsp;
     <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> BeerCellRendererSkin <span style="color: #0066CC;">extends</span> UISkin <span style="color: #0066CC;">implements</span> ICellRenderer
     <span style="color: #66cc66;">&#123;</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> _beer:<span style="color: #0066CC;">Object</span>;
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _row:<span style="color: #0066CC;">int</span>;
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _column:<span style="color: #0066CC;">int</span>;
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _section:<span style="color: #0066CC;">int</span>;
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _index:<span style="color: #0066CC;">int</span>;    
&nbsp;
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _yOffset:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">12</span>;
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _xOffset:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">35</span>;
&nbsp;
          <span style="color: #808080; font-style: italic;">/**
           * Skins
           **/</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> _upSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> _selectedSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> _downSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> _disabledSkin:Sprite;
&nbsp;
          <span style="color: #808080; font-style: italic;">/**
           * Cell Renderer content
           **/</span>
          <span style="color: #808080; font-style: italic;">// I use a background sprite because I want to</span>
          <span style="color: #808080; font-style: italic;">// make sure it's the lowest layer. Then I can just</span>
          <span style="color: #808080; font-style: italic;">// modify the lowest layer without overwriting the text.</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> _background:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_name</span>:Label;
          protected <span style="color: #000000; font-weight: bold;">var</span> _brewery:Label;
          protected <span style="color: #000000; font-weight: bold;">var</span> _beerType:Label;
          protected <span style="color: #000000; font-weight: bold;">var</span> _ratingText:Label;
          protected <span style="color: #000000; font-weight: bold;">var</span> _avgRating:Label;
          protected <span style="color: #000000; font-weight: bold;">var</span> _image:Image;
&nbsp;
          <span style="color: #808080; font-style: italic;">/**
           * TextFormats
           **/</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> _nameFormat:<span style="color: #0066CC;">TextFormat</span>;
          protected <span style="color: #000000; font-weight: bold;">var</span> _breweryFormat:<span style="color: #0066CC;">TextFormat</span>;
          protected <span style="color: #000000; font-weight: bold;">var</span> _beerTypeFormat:<span style="color: #0066CC;">TextFormat</span>;
          protected <span style="color: #000000; font-weight: bold;">var</span> _ratingTextFormat:<span style="color: #0066CC;">TextFormat</span>;
          protected <span style="color: #000000; font-weight: bold;">var</span> _avgRatingFormat:<span style="color: #0066CC;">TextFormat</span>;
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> BeerCellRendererSkin<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">/**
                * TextFormats
                **/</span>
               _nameFormat = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _nameFormat.<span style="color: #0066CC;">color</span> = 0xbd5251;
               _nameFormat.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">16</span>;
               _nameFormat.<span style="color: #0066CC;">bold</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
               _breweryFormat = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _breweryFormat.<span style="color: #0066CC;">color</span> = 0x525252;
               _breweryFormat.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">14</span>;
               _breweryFormat.<span style="color: #0066CC;">bold</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
               _beerTypeFormat = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _beerTypeFormat.<span style="color: #0066CC;">color</span> = 0x525252;
               _beerTypeFormat.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">14</span>;
&nbsp;
               _ratingTextFormat = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _ratingTextFormat.<span style="color: #0066CC;">color</span> = 0x79523e;
               _ratingTextFormat.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">12</span>;
               _ratingTextFormat.<span style="color: #0066CC;">bold</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
               _avgRatingFormat = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _avgRatingFormat.<span style="color: #0066CC;">color</span> = 0x000000;
               _avgRatingFormat.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">14</span>;
               _avgRatingFormat.<span style="color: #0066CC;">bold</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">/**
                * CellRenderer Content
                **/</span>
               _image = <span style="color: #000000; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _image.<span style="color: #006600;">x</span> = _xOffset;
               _image.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
               _image.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> DropShadowFilter<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">45</span>,0x000000,.5,<span style="color: #cc66cc;">4</span>,<span style="color: #cc66cc;">4</span>,.5<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
               <span style="color: #0066CC;">_name</span> = <span style="color: #000000; font-weight: bold;">new</span> Label<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               <span style="color: #0066CC;">_name</span>.<span style="color: #006600;">x</span> = _xOffset+<span style="color: #cc66cc;">80</span>;
               <span style="color: #0066CC;">_name</span>.<span style="color: #006600;">y</span> = _yOffset;
               <span style="color: #0066CC;">_name</span>.<span style="color: #006600;">format</span> = _nameFormat;
&nbsp;
               _brewery = <span style="color: #000000; font-weight: bold;">new</span> Label<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _brewery.<span style="color: #006600;">x</span> = _xOffset+<span style="color: #cc66cc;">80</span>;
               _brewery.<span style="color: #006600;">y</span> = _yOffset+<span style="color: #cc66cc;">20</span>;
               _brewery.<span style="color: #006600;">format</span> = _breweryFormat;
&nbsp;
               _beerType = <span style="color: #000000; font-weight: bold;">new</span> Label<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _beerType.<span style="color: #006600;">x</span> = _xOffset+<span style="color: #cc66cc;">80</span>;
               _beerType.<span style="color: #006600;">y</span> = _yOffset+<span style="color: #cc66cc;">35</span>;
               _beerType.<span style="color: #006600;">format</span> = _beerTypeFormat;
&nbsp;
               _ratingText = <span style="color: #000000; font-weight: bold;">new</span> Label<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _ratingText.<span style="color: #006600;">x</span> = _xOffset+<span style="color: #cc66cc;">80</span>;
               _ratingText.<span style="color: #006600;">y</span> = _yOffset+<span style="color: #cc66cc;">55</span>;
               _ratingText.<span style="color: #006600;">format</span> = _ratingTextFormat;
               _ratingText.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;AVG Rating&quot;</span>;
&nbsp;
               _avgRating = <span style="color: #000000; font-weight: bold;">new</span> Label<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               _avgRating.<span style="color: #006600;">x</span> = _xOffset + <span style="color: #cc66cc;">150</span>;
               _avgRating.<span style="color: #006600;">y</span> = _yOffset+<span style="color: #cc66cc;">54</span>;
&nbsp;
               _background = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
          <span style="color: #808080; font-style: italic;">/**
           * Getters/Setters
           **/</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Object</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #b1b100;">return</span> _beer;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>:<span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               _beer = <span style="color: #0066CC;">data</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Set the text and images for the</span>
               <span style="color: #808080; font-style: italic;">// label after we get data from the list.</span>
               _image.<span style="color: #006600;">setImage</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">thumb</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #0066CC;">_name</span>.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">beerName</span>;
               <span style="color: #0066CC;">_name</span>.<span style="color: #0066CC;">width</span> = width-<span style="color: #cc66cc;">150</span>;
&nbsp;
               _brewery.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">brewerName</span>;
               _brewery.<span style="color: #0066CC;">width</span> = width-<span style="color: #cc66cc;">150</span>;
&nbsp;
               _beerType.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">styleName</span>;
               _beerType.<span style="color: #0066CC;">width</span> = width-<span style="color: #cc66cc;">150</span>;
&nbsp;
               <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">avgRating</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>
               <span style="color: #66cc66;">&#123;</span>
                    _avgRatingFormat.<span style="color: #0066CC;">color</span> = 0x4c9d17;
               <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">data</span>.<span style="color: #006600;">avgRating</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
               <span style="color: #66cc66;">&#123;</span>
                    _avgRatingFormat.<span style="color: #0066CC;">color</span> = 0x9d1717;
               <span style="color: #66cc66;">&#125;</span>
&nbsp;
               _avgRating.<span style="color: #0066CC;">text</span> = <span style="color: #0066CC;">data</span>.<span style="color: #006600;">avgRating</span>;
               _avgRating.<span style="color: #006600;">format</span> = _avgRatingFormat;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">index</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #b1b100;">return</span> _index;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">index</span><span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               _index = value;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> row<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #b1b100;">return</span> _row;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> row<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               _row = value;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> column<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #b1b100;">return</span> _column;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> column<span style="color: #66cc66;">&#40;</span>value:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               _column = value;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> section<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #b1b100;">return</span> _section;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> section<span style="color: #66cc66;">&#40;</span>section:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               _section = section;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> isHeader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          <span style="color: #808080; font-style: italic;">/**
           * Overriden Functions
           */</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> initializeStates<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #808080; font-style: italic;">// Set up the skin states</span>
               _upSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;    
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">UP</span>,_upSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               _downSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;    
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">DOWN</span>,_downSkin<span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">DOWN_SELECTED</span>,_downSkin<span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">SELECTED</span>,_downSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               showSkin<span style="color: #66cc66;">&#40;</span>_upSkin<span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> setState<span style="color: #66cc66;">&#40;</span>state:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span>.<span style="color: #006600;">setState</span><span style="color: #66cc66;">&#40;</span>state<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #000000; font-weight: bold;">var</span> matrix:Matrix = <span style="color: #000000; font-weight: bold;">new</span> Matrix<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               matrix.<span style="color: #006600;">createGradientBox</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>,<span style="color: #0066CC;">height</span>,<span style="color: #cc66cc;">90</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">180</span><span style="color: #66cc66;">*</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Check to see what state is being set and then draw</span>
               <span style="color: #808080; font-style: italic;">// the graphics on the background Sprite accordingly.</span>
               <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>state == SkinStates.<span style="color: #0066CC;">UP</span><span style="color: #66cc66;">&#41;</span>
               <span style="color: #66cc66;">&#123;</span>                   
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginGradientFill</span><span style="color: #66cc66;">&#40;</span>GradientType.<span style="color: #006600;">LINEAR</span>,
                              <span style="color: #66cc66;">&#91;</span>0xffffff,0xf2f2f2,0xffffff<span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#93;</span>,matrix<span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>,0x221206<span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRoundRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">10</span>,width-<span style="color: #cc66cc;">35</span>,height-<span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">7</span>,<span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               <span style="color: #66cc66;">&#125;</span>
               <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>state == SkinStates.<span style="color: #0066CC;">DOWN</span> <span style="color: #66cc66;">||</span>
                    state == SkinStates.<span style="color: #006600;">DOWN_SELECTED</span> <span style="color: #66cc66;">||</span>
                    state == SkinStates.<span style="color: #006600;">SELECTED</span><span style="color: #66cc66;">&#41;</span>
               <span style="color: #66cc66;">&#123;</span>                        
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginGradientFill</span><span style="color: #66cc66;">&#40;</span>GradientType.<span style="color: #006600;">LINEAR</span>,
                              <span style="color: #66cc66;">&#91;</span>0xaaaaaa,0xcfcfcf,0xaaaaaa<span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">127</span>,<span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#93;</span>,matrix<span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>,0x221206<span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRoundRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">10</span>,width-<span style="color: #cc66cc;">35</span>,height-<span style="color: #cc66cc;">20</span>,<span style="color: #cc66cc;">7</span>,<span style="color: #cc66cc;">7</span><span style="color: #66cc66;">&#41;</span>;
                    _background.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               <span style="color: #66cc66;">&#125;</span>              
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> onAdded<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span>.<span style="color: #006600;">onAdded</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span>_background<span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span>_image<span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_name</span><span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span>_brewery<span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span>_beerType<span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span>_ratingText<span style="color: #66cc66;">&#41;</span>;
               addChild<span style="color: #66cc66;">&#40;</span>_avgRating<span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> onRemoved<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span>.<span style="color: #006600;">onRemoved</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span>_background<span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span>_image<span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_name</span><span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span>_brewery<span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span>_beerType<span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span>_ratingText<span style="color: #66cc66;">&#41;</span>;
               removeChild<span style="color: #66cc66;">&#40;</span>_avgRating<span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
     <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/" data-text="Creating Custom List Skins for the BlackBerry PlayBook" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2011/01/creating-custom-list-skins-for-the-blackberry-playbook/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Skinning PlayBook Components</title>
		<link>http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/</link>
		<comments>http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 18:39:54 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash builder]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PlayBook]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2642</guid>
		<description><![CDATA[I&#8217;ve been having a lot of fun with the PlayBook. It&#8217;s really nice to be using ActionScript 3 to write a &#8220;native&#8221; application and the QNX components have been really good. One of the things I wanted to do right &#8230; <a href="http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.digitalbackcountry.com/wp-content/uploads/components_closeup.png" alt="" title="components_closeup" width="295" height="190" class="alignright size-full wp-image-2643" />I&#8217;ve been having a lot of fun with the PlayBook. It&#8217;s really nice to be using ActionScript 3 to write a &#8220;native&#8221; application and the QNX components have been really good. One of the things I wanted to do right away was skin them to customize them for the Pintley app I&#8217;m building. Luckily, if you&#8217;ve spent any time doing Flash, it&#8217;s pretty straightforward. The main issue is that the SDK is still fairly new so there were some small things I had to figure out.</p>
<p>There are basically three ways you can skin components on the PlayBook: with a Flash Professional SWC that contains the graphic objects, with images, and using the AS3 drawing API. I&#8217;ll show off the last two.</p>
<h2>Skinning with Images</h2>
<p>What I wanted to do was skin a TextInput and a Button for my login page. The PlayBook SDK has a few classes that are specifically for skinning, which I was able to check out via <a href="http://www.blackberry.com/developers/docs/airapi/1.0.0/">the documentation</a>. There&#8217;s an entire package <code>qnx.ui.skins</code> that has classes for skinning. It looks like, <a href="http://www.blackberry.com/developers/docs/airapi/1.0.0/skins-detail.html">based on this page</a>, that most of the default skins, are images. So I tried that first.  What I found helpful was to grab those stock images, bring them into Photoshop, and start tweaking them.</p>
<p>I create three different PNGs for each of the states the TextInput has: up, down, and focus. Once I have those, I embed them in my custom skin class and use the specific QNX APIs to set the look and feel. The class extends the <code>qnx.ui.skins.text.TextInputSkin</code> class, which is the base class for creating a TextInputSkin. Using the attributes on the <code>Embed</code> tag you can set the numbers to make the nine-slice scaling work for your image.</p>
<p>The method to override is the <code>initializeStates</code> method. That&#8217;s the best place to register properties for states with the QNX component model. Then there are two other methods to use in that method. The first one, <code>setSkinState</code>, just associates a specific skin with a specific state. The last line of code, <code>showSkin</code>, takes a skin class and that&#8217;s what the component will use as the default skin.</p>
<p align="center"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/pintely_app.png" alt="" title="pintely_app" width="450" /></p>
<p>That&#8217;s pretty much all there is to it. Here&#8217;s the class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">pintley</span>.<span style="color: #006600;">skins</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
&nbsp;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #006600;">SkinStates</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">TextInputSkin</span>;
&nbsp;
     <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PintleyImageTextInputSkin <span style="color: #0066CC;">extends</span> TextInputSkin
     <span style="color: #66cc66;">&#123;</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> upSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> downSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> focusSkin:Sprite;
&nbsp;
          <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;/assets/skins/TextInputUp.png&quot;</span>,
               scaleGridLeft=<span style="color: #ff0000;">&quot;22&quot;</span>,scaleGridRight=<span style="color: #ff0000;">&quot;350&quot;</span>,
               scaleGridTop=<span style="color: #ff0000;">&quot;18&quot;</span>,scaleGridBottom=<span style="color: #ff0000;">&quot;38&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> UpGraphic:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
          <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;/assets/skins/TextInputDown.png&quot;</span>,
               scaleGridLeft=<span style="color: #ff0000;">&quot;22&quot;</span>,scaleGridRight=<span style="color: #ff0000;">&quot;350&quot;</span>,
               scaleGridTop=<span style="color: #ff0000;">&quot;18&quot;</span>,scaleGridBottom=<span style="color: #ff0000;">&quot;38&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> DownGraphic:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
          <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;/assets/skins/TextInputFocus.png&quot;</span>,
               scaleGridLeft=<span style="color: #ff0000;">&quot;22&quot;</span>,scaleGridRight=<span style="color: #ff0000;">&quot;350&quot;</span>,
               scaleGridTop=<span style="color: #ff0000;">&quot;18&quot;</span>,scaleGridBottom=<span style="color: #ff0000;">&quot;38&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FocusGraphic:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PintleyImageTextInputSkin<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> initializeStates<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span>.<span style="color: #006600;">initializeStates</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Up State</span>
               upSkin = <span style="color: #000000; font-weight: bold;">new</span> UpGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">UP</span>,upSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Down State</span>
               downSkin = <span style="color: #000000; font-weight: bold;">new</span> DownGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">DOWN</span>,downSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Focus Skin</span>
               focusSkin = <span style="color: #000000; font-weight: bold;">new</span> FocusGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">FOCUS</span>,focusSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               showSkin<span style="color: #66cc66;">&#40;</span>upSkin<span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
     <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h2>Skinning with the Drawing API</h2>
<p>Another way to skin the components is using the drawing API. This one is mostly similar to using images with a couple of minor changes. Create the variables in the same way, and override the <code>initializeStates</code> function. Skinning with the drawing API also uses the same methods as the images. <code>setSkinState</code> works the same way and <code>showSkin</code> sets the default skin.</p>
<p>The main difference is that there is an external function in this example, which is where the drawing takes place. Since the different states of the component will look generally the same, I pass in some variables to change the appearance based on which state it&#8217;s being drawn for. The method gets called in the <code>initializeStates</code> function after the skin sprites are initialized. You could also just do the drawing in the <code>initializeStates</code> method, but this is a bit better in terms of code reuse.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">pintley</span>.<span style="color: #006600;">skins</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">DropShadowFilter</span>;
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Rectangle</span>;
&nbsp;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #006600;">SkinStates</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">TextInputSkin</span>;
&nbsp;
     <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PintleyTextInput <span style="color: #0066CC;">extends</span> TextInputSkin
     <span style="color: #66cc66;">&#123;</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> upSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> downSkin:Sprite;
          protected <span style="color: #000000; font-weight: bold;">var</span> focusSkin:Sprite;
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PintleyTextInput<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#123;</span>    
               <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          protected <span style="color: #000000; font-weight: bold;">function</span> drawSprite<span style="color: #66cc66;">&#40;</span>item:Sprite,lineThickness:<span style="color: #0066CC;">int</span>,shadow:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #000000; font-weight: bold;">var</span> innerShadow:DropShadowFilter = <span style="color: #000000; font-weight: bold;">new</span> DropShadowFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                    innerShadow.<span style="color: #006600;">distance</span> = <span style="color: #cc66cc;">10</span>;
                    innerShadow.<span style="color: #006600;">angle</span> = <span style="color: #cc66cc;">40</span>;
                    innerShadow.<span style="color: #006600;">strength</span> = .15;
                    innerShadow.<span style="color: #006600;">blurX</span> = <span style="color: #cc66cc;">25</span>;
                    innerShadow.<span style="color: #006600;">blurY</span> = <span style="color: #cc66cc;">25</span>;
                    innerShadow.<span style="color: #006600;">inner</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
               item.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xffffff,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
               item.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span>lineThickness,0x3c2414,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
               item.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRoundRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">350</span>,<span style="color: #cc66cc;">30</span>,<span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;
               item.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;    
               item.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span>innerShadow<span style="color: #66cc66;">&#93;</span>;
&nbsp;
               <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>shadow<span style="color: #66cc66;">&#41;</span>
               <span style="color: #66cc66;">&#123;</span>
                    <span style="color: #000000; font-weight: bold;">var</span> dropShadow:DropShadowFilter = <span style="color: #000000; font-weight: bold;">new</span> DropShadowFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                         dropShadow.<span style="color: #006600;">distance</span> = <span style="color: #cc66cc;">0</span>;
                         dropShadow.<span style="color: #006600;">blurX</span> = <span style="color: #cc66cc;">21</span>;
                         dropShadow.<span style="color: #006600;">blurY</span> = <span style="color: #cc66cc;">21</span>;
                         dropShadow.<span style="color: #006600;">angle</span> = <span style="color: #cc66cc;">0</span>;
                         dropShadow.<span style="color: #006600;">strength</span> = <span style="color: #cc66cc;">1</span>;
                         dropShadow.<span style="color: #0066CC;">color</span> = 0x3c2414;
&nbsp;
                    item.<span style="color: #006600;">filters</span> = <span style="color: #66cc66;">&#91;</span>innerShadow,dropShadow<span style="color: #66cc66;">&#93;</span>;
               <span style="color: #66cc66;">&#125;</span>
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> initializeStates<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #808080; font-style: italic;">/**
                * UpSkin
                **/</span>
               upSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               drawSprite<span style="color: #66cc66;">&#40;</span>upSkin,<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">UP</span>, upSkin <span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">/**
                * DownSkin
                **/</span>
               downSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               drawSprite<span style="color: #66cc66;">&#40;</span>downSkin,<span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">DOWN</span>, downSkin <span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">/**
                * FocusSkin
                **/</span>
               focusSkin = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               drawSprite<span style="color: #66cc66;">&#40;</span>focusSkin,<span style="color: #cc66cc;">3</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">FOCUS</span>, focusSkin <span style="color: #66cc66;">&#41;</span>;
&nbsp;
               showSkin<span style="color: #66cc66;">&#40;</span> upSkin <span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
     <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>One last example that I have uses the image method but skins a button instead of the TextInput control. One thing I&#8217;ve noticed about the QNX controls is that some of the components (like TextInput) have their own skin files that can be subclassed, while others, like Buttons, have skins that look like they just subclass UISkin. So instead of calling <code>super.initializeStates()</code> like I did with the TextInput, with the Button, I just override <code>initializeStates()</code> and put the code there.</p>
<p><b>Update:</b> Thanks to a comment below, I realized that when you extend UISkin, the skinned objects have to be of type DisplayObject, not Sprite.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">pintley</span>.<span style="color: #006600;">skins</span>
<span style="color: #66cc66;">&#123;</span>
     <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
&nbsp;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #006600;">SkinStates</span>;
     <span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">skins</span>.<span style="color: #006600;">UISkin</span>;
&nbsp;
     <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> LoginButton <span style="color: #0066CC;">extends</span> UISkin
     <span style="color: #66cc66;">&#123;</span>
          protected <span style="color: #000000; font-weight: bold;">var</span> upSkin:DisplayObject;
          protected <span style="color: #000000; font-weight: bold;">var</span> downSkin:DisplayObject;
          protected <span style="color: #000000; font-weight: bold;">var</span> selectedSkin:DisplayObject;
          protected <span style="color: #000000; font-weight: bold;">var</span> disabledSkin:DisplayObject;
&nbsp;
          <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;/assets/skins/LoginButtonUp.png&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> UpGraphic:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
          <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;/assets/skins/LoginButtonSelected.png&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> DownGraphic:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
          <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;/assets/skins/LoginButtonDisabled.png&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
          <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> DisabledGraphic:<span style="color: #000000; font-weight: bold;">Class</span>;         
&nbsp;
          <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> LoginButton<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
          <span style="color: #66cc66;">&#123;</span>
               <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>
&nbsp;
          override protected <span style="color: #000000; font-weight: bold;">function</span> initializeStates<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
          <span style="color: #66cc66;">&#123;</span>
&nbsp;
               <span style="color: #808080; font-style: italic;">// Up State</span>
               upSkin = <span style="color: #000000; font-weight: bold;">new</span> UpGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">UP</span>,upSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Down State</span>
               downSkin = <span style="color: #000000; font-weight: bold;">new</span> DownGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #0066CC;">DOWN</span>,downSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Selected State</span>
               selectedSkin = <span style="color: #000000; font-weight: bold;">new</span> DownGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">SELECTED</span>,selectedSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               <span style="color: #808080; font-style: italic;">// Disabled Skin</span>
               disabledSkin = <span style="color: #000000; font-weight: bold;">new</span> DisabledGraphic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
               setSkinState<span style="color: #66cc66;">&#40;</span>SkinStates.<span style="color: #006600;">DISABLED</span>,disabledSkin<span style="color: #66cc66;">&#41;</span>;
&nbsp;
               showSkin<span style="color: #66cc66;">&#40;</span>upSkin<span style="color: #66cc66;">&#41;</span>;
          <span style="color: #66cc66;">&#125;</span>         
     <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>So hopefully that gets you started on skinning. As I get to more complicated components I&#8217;ll blog about skinning those as well, but the basic premise seems the same across most of the components.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/" data-text="Skinning PlayBook Components" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2010/12/skinning-playbook-components/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Android, Flash, Free Beer, Pizza</title>
		<link>http://blog.digitalbackcountry.com/2010/09/android-flash-free-beer-pizza/</link>
		<comments>http://blog.digitalbackcountry.com/2010/09/android-flash-free-beer-pizza/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 20:11:31 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[droid]]></category>
		<category><![CDATA[motorola]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2536</guid>
		<description><![CDATA[If you&#8217;re in San Francisco this week you&#8217;ll want to swing by the free Droid Does Flash event that we&#8217;re putting on with Motorola on Thursday, September 16th, at the Adobe offices in San Francisco. It&#8217;s going to be a &#8230; <a href="http://blog.digitalbackcountry.com/2010/09/android-flash-free-beer-pizza/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re in San Francisco this week you&#8217;ll want to swing by the free <a href="http://flashmeetup.eventbrite.com/">Droid Does Flash</a> event that we&#8217;re putting on with Motorola on Thursday, September 16th, at the Adobe offices in San Francisco.</p>
<p align="center"><a href="http://flashmeetup.eventbrite.com/"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/droid_does_flash.jpg" alt="Droid Does Flash" title="droid_does_flash" width="450" height="200" class="alignnone size-full wp-image-2537" /></a></p>
<p>It&#8217;s going to be a chance to check out some of Motorola&#8217;s new devices, win some software, drink free beer, and hear about optimizing content for Flash and devices. I&#8217;ll be talking about where Flash is in the mobile world and how we got here including some of the things we did to make the runtime sing on Android. After that, it&#8217;s all about networking, hanging out with some of the folks from Adobe, and drinking free beer. We&#8217;ve also got a pretty cool beer mug for all of the attendees that lets you show your malty-enthusiasm for Flash and Android.</p>
<p align="center"><img src="http://blog.digitalbackcountry.com/wp-content/uploads/Mug-3Color-1.jpg" alt="" title="Mug-3Color-1" width="225" height="290" class="alignnone size-full wp-image-2538" /></p>
<p>Registrations are starting to fill up, so I encourage you to hit the <a href="http://flashmeetup.eventbrite.com/">Eventbrite site</a> and sign yourself up.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2010/09/android-flash-free-beer-pizza/" data-text="Android, Flash, Free Beer, Pizza" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2010/09/android-flash-free-beer-pizza/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2010/09/android-flash-free-beer-pizza/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/43 queries in 0.123 seconds using disk: basic
Object Caching 1224/1330 objects using disk: basic

Served from: blog.digitalbackcountry.com @ 2012-02-08 12:03:49 -->
