<?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>Sean Monahan &#187; Beer Near Here</title>
	<atom:link href="http://seanmonahan.org/tag/beer-near-here/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanmonahan.org</link>
	<description></description>
	<lastBuildDate>Wed, 07 Dec 2011 04:20:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Beer Near Here Part 5: Creating the Art Assets</title>
		<link>http://seanmonahan.org/2009/04/07/beer-near-here-part-5-creating-the-art-assets/</link>
		<comments>http://seanmonahan.org/2009/04/07/beer-near-here-part-5-creating-the-art-assets/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 01:35:40 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[AIR Skinning]]></category>
		<category><![CDATA[Beer Near Here]]></category>
		<category><![CDATA[Custom Chrome]]></category>
		<category><![CDATA[Photo]]></category>

		<guid isPermaLink="false">http://seanmonahan.org/?p=389</guid>
		<description><![CDATA[Previously I discussed the process of implementing a custom chrome in Adobe AIR, with this post I&#8217;ll delve into how I created the assets I used in Beer Near Here Desktop. In particular I&#8217;ll discuss how I acquired all the beer glass images necessary to create the loading animation for Beer Near Here Desktop. What [...]]]></description>
			<content:encoded><![CDATA[<p>Previously I discussed the process of implementing a custom chrome in Adobe AIR, with this post I&#8217;ll delve into how I created the assets I used in Beer Near Here Desktop.  In particular I&#8217;ll discuss how I acquired all the beer glass images necessary to create the loading animation for Beer Near Here Desktop.</p>
<p><span id="more-389"></span></p>
<h3>What You&#8217;ll Need</h3>
<p>To get the beer glass image I used 7 pieces of equipment:</p>
<ol>
<li>A beer</li>
<li>A beer glass</li>
<li>A coaster (this is optional)</li>
<li>Some (cheapie shop) lighting equipment</li>
<li>A large piece of white paper and something to prop it up</li>
<li>A camera</li>
<li>A siphon</li>
</ol>
<h3>Photographing</h3>
<p>The setup was to fill the glass with beer and place it and the coaster on the sheet of paper.  The paper was then propped up (I used a wine bottle), turning it into a backdrop.  The lights were setup so I could get some highlights.  The paper being white is important here because I wanted the glass to be transparent and white lends itself to becoming transparent better than say, black.</p>

<a href="http://seanmonahan.org/wp-content/gallery/beer-near-here-desktop-part-5/half-full.jpg" title="" class="thickbox" rel="singlepic48" >
	<img class="ngg-singlepic" src="http://seanmonahan.org/wp-content/gallery/cache/48__550x_half-full.jpg" alt="half-full.jpg" title="half-full.jpg" />
</a>

<p>Once had the scene setup I placed my camera on a tripod and framed the shot I wanted.  It really helps here to have a camera with a manual focus option and to triple check your focus unless you want to drink a few beers through a siphon.  It wasn&#8217;t very enjoyable.  Additionally, you&#8217;ll want to do this on a stable surface as the goal is to never move the cup at all.</p>
<p>With the stage set I snapped a pic of the full beer glass and then put the siphon in the beer and sucked out a little bit of beer and removed the siphon from the frame.  Rinse and repeat until the glass is empty.  After you have all your images it&#8217;s time to get them into Photoshop.</p>
<h3>Masking</h3>
<p>With your images in Photoshop it&#8217;s time to create some masks so we can knockout the beer glass and coaster.  One of the nice things about this is that, for the shape we are masking (the beer glass), all of these images are essentially the same thanks to the tripod.  So take your time with your masking technique of choice and make a really good mask on one of the images and then copy and paste it into all the other images.  You&#8217;ll end up with something like this:</p>

<a href="http://seanmonahan.org/wp-content/gallery/beer-near-here-desktop-part-5/mask.jpg" title="" class="thickbox" rel="singlepic47" >
	<img class="ngg-singlepic" src="http://seanmonahan.org/wp-content/gallery/cache/47__550x_mask.jpg" alt="mask.jpg" title="mask.jpg" />
</a>

<p>Once I had all my images masked I collected them into a single layered file, one image per frame, and cropped the image down to just the glass.  This is a good point to save your work.</p>
<p>The next thing to do is add some transparency the to progressively more empty images of the glass.  To do this I merged each of my layers with an empty layer.  This has the effect of eliminating the mask used to knockout the glass producing a flat image with transparency where the mask was.  I then created a new layer mask for each layer and used a brush set to about 25% opacity and 25% hardness to slowly paint over the areas where one would expect to be able to see through the beer glass.  I found it helpful to make a screen cap of my desktop and throw it in under all the layers so I could see if the transparency looked good against it.</p>
<p>Creating all these transparencies for the glass is quite time consuming but in the end it creates a very nice effect.  Be sure to save the layered file as a PSD so you can come back to it later if need be.  At this point you have all your assets and now it&#8217;s time to make a decision about how to use them.  In my case one of my goals with Beer Near Here Desktop was to create a completely Flex-based solution.  Specifically, I wanted the animation I created with the beer glass to be done with Flex so I exported all of the layers out as individual 24-bit PNGs (preserving the nice transparency I worked so hard at creating) and imported them into my Flex project.</p>
<p>These PNGs look great but they also now account for the bulk of BNHD&#8217;s file size.  An alternative approach is to import the layered PSD into Flash, create the animation there and then import the resultant SWF into your Flex project.  This will almost certainly result in a smaller size for the app, which is ideal unless you have other goals like I did.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanmonahan.org/2009/04/07/beer-near-here-part-5-creating-the-art-assets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beer Near Here Desktop Part 4: Using Custom Chrome</title>
		<link>http://seanmonahan.org/2009/03/10/beer-near-here-desktop-part-4-using-custom-chrome/</link>
		<comments>http://seanmonahan.org/2009/03/10/beer-near-here-desktop-part-4-using-custom-chrome/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 02:31:10 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIR Skinning]]></category>
		<category><![CDATA[Beer Near Here]]></category>
		<category><![CDATA[Custom Chrom]]></category>

		<guid isPermaLink="false">http://seanmonahan.org/?p=356</guid>
		<description><![CDATA[If you&#8217;ve been reading along you&#8217;ll know that&#8230;I haven&#8217;t posted anything in awhile.  Hopefully this post will make up for that a bit.  Today I&#8217;ll be writing about using custom chrome (sometimes called &#8216;skins&#8217;) with AIR.  A quick Google search will pull up quite a few resources on this but I noticed that most of [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been reading along you&#8217;ll know that&#8230;I haven&#8217;t posted anything in awhile.  Hopefully this post will make up for that a bit.  Today I&#8217;ll be writing about using custom chrome (sometimes called &#8216;skins&#8217;) with AIR.  A quick Google search will pull up quite a few resources on this but I noticed that most of them were for Flex 2 which is, apparently, quite different from Flex 3 when it comes to AIR.  Also I couldn&#8217;t really find a definitive guide that pulled it all together.  Maybe this post can remedy this situation.</p>
<p><span id="more-356"></span></p>
<p>Before we get started diving into custom chrome you should ask yourself if you really need to use it.  There is a performance cost associated with creating your own custom chrome.  It also takes longer to create custom chrome, so not only will your app be slower, it will take longer to develop.  Additionally (man, I&#8217;m really making custom chrome sound like a bad idea, huh?) making a custom skin for your app may decrease usability as you&#8217;ll be forcing your users to become accustomed to an interfaces that differs from the standard one their OSes present.</p>
<p>So custom chrome may not be a good idea.  Then again, it can really set your app apart and to I&#8217;ve yet to see an AIR app resource-intense enough that the performance penalty for using custom chrome would really matter.  Since you&#8217;re reading this you&#8217;ve probably already decided to go ahead and use a custom skin for you application so let&#8217;s get to it.</p>
<p>The first thing to do is open up your application&#8217;s XML descriptor file.  In this file there are two items of interest so far as chrome is concerned:</p>
<ol>
<li>systemChrome and</li>
<li>transparent</li>
</ol>
<p>SystemChrome is a flag that tells your application to either use the &#8220;standard&#8221; chrome (i.e., the OS&#8217;s chrome) or &#8220;none&#8221;.  Since we want to use custom chrome set this to &#8220;none&#8221;.</p>
<p>Transparent is a flag that sets your application window to be transparent.  It takes a value of &#8220;true&#8221; or &#8220;false&#8221;.  You can only use this when systemChrome is set to none.  If you are going to use an unusual shape for you application, like a beer glass, set this to &#8220;true&#8221; so you won&#8217;t have a square application window floating around.</p>
<p>If you were to run your app at this point you&#8217;d see you still have a title bar with maximize, minimize and close buttons.  If you&#8217;re going custom you probably want to go all out and make your own title bar, or not as you may not even want a traditional title bar.  The chrome you are seeing now is called &#8220;FlexChrome&#8221; and to get rid of it you need to make an edit to your application&#8217;s MXML file.  In the WindowedApplication tag add an attribute, &#8220;showFlexChrome&#8221; and set it to &#8220;false&#8221;:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;WindowedApplication
showFlexChrome=&quot;false&quot;/&gt;
</pre>
<p>When you run your app now you&#8217;ll no longer have a title bar or any maximize, minimize or close buttons.  You also can no longer drag your application.  Using system or Flex chrome offers a lot of functionality for free so we&#8217;ve got some work to do to get it back.  Beer Near Here Desktop does not support maximizing or minimizing so I&#8217;ll only be adding a close button and some drag functionality.  Adding maximize and minimize should work in a similar manner to closing.  But first, we&#8217;ll throw in a background so we have something to look at.</p>
<p>The Beer Near Here Desktop application window is exactly 550 pixels wide and 830 pixels tall.  The background beer glass you see when the app loads is 532 pixels wide and 800 pixels tall.  Why the difference?  When you do a search another image is laid on top of the application, dimming it and effectively disabling most of the buttons.  This overlay image is 550&#215;830 pixels.</p>
<p>So the first thing I did was set the width and height for the entire application in the WindowedApplication tag:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;WindowedApplication
showFlexChrome=&quot;false&quot;
width=&quot;550&quot; height=&quot;830&quot;/&gt;
</pre>
<p>I then added an mx:Image control inside WindowedApplication:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;mx:Image
top=&quot;0&quot; left=&quot;0&quot;
id=&quot;background&quot;
width=&quot;532&quot; height=&quot;800&quot;
source=&quot;images/loading-anim/00.png&quot;/&gt;
</pre>
<p>Running the app now shows a nice glass of beer.  In fact, get a beer now, it&#8217;ll make this more fun.</p>
<p>Okay, I&#8217;m back with my beer <img src='http://seanmonahan.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So we now have our app running with a custom background image but we can&#8217;t move it or close it.  Well, we can close it, but we have to rely on the OS for that rather than the application itself.  For now you can close the app by either right-clicking the application in the Windows start bar or the Mac OS dock and choosing the close command.  Since the background is in place and it&#8217;s easy to do we&#8217;ll implement some dragging next.</p>
<pre class="brush: jscript; title: ; notranslate">

// This drags your application
NativeApplication.nativeApplication.activeWindow.stage.nativeWindow.stage.nativeWindow.startMove();
</pre>
<p>The above is a nice, long line of Actionscript that will drag your application.  To make use of it you&#8217;ll have to import the flash.desktop.NativeApplication package into your application.  To drag the application we are going to listen for the mouse down event on the background image we added earlier.  To handle this we&#8217;ll need an event listener:</p>
<pre class="brush: jscript; title: ; notranslate">

private function _dragStart(event:MouseEvent):void
{
NativeApplication.nativeApplication.activeWindow.stage.nativeWindow.stage.nativeWindow.startMove();
}
</pre>
<p>Now that we have our event listener we can wire it up to the background image:</p>
<pre class="brush: jscript; title: ; notranslate">

// Add the drag event listener
background.addEventListeners(MouseEvent.MOUSE_DOWN, _dragStart);
</pre>
<p>This wires the mouse down event to call the _dragStart method thus our app will be dragged so long as the mouse button is held down over the app.  Easy enough, right?  There is one slight catch: this only works if the background image is clicked.  This means that if you place another image on top of the background image like I did with the Beer Near Here logo, clicking in the logo area will not initiate a drag &#8212; you&#8217;ll have to add a mouse down event listener to this other image (or whatever you added) as well.  There is a nice part to this as well as transparent areas of the background image do not register clicks.  So, while the application window and background image for BNHD are actually rectangular if you click in the transparent part of the application you&#8217;ll actually click through to whatever is beneath the application.</p>
<p>Taking stock of the situation we have an application with a custom background image that can be dragged by clicking the background and dragging the mouse.  In the final part of this post we&#8217;ll add a close button so we can close the app without relying on the user&#8217;s operating system.  To accomplish this with BNHD I created an ImageButton component which can be found in my <a title="Sean's Flex Library." href="/projects/flex-library/">Flex Library</a> (there is some <a title="Sean's Flex Library Documentation." href="/code/flex/docs/">documentation</a> on this component, hopefully I&#8217;ll have a demo soon-ish).</p>
<p>The ImageButton component is very straightforward: you give it an image for the button, an image for the button&#8217;s hover state and a function to call when it is clicked.  If you don&#8217;t want to use ImageButton you can use any clickable control.  So code for the ImageButton looks like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;smorg:ImageButton
id=&quot;closeBtn&quot;
image=&quot;@Embed('images/close-btn.png')&quot;
hoverImage=&quot;@Embed('images/close-hover-btn.png')&quot;
click=&quot;_closeApp();&quot;
right=&quot;85&quot; top=&quot;19&quot;
width=&quot;42&quot; height=&quot;42&quot;/&gt;
</pre>
<p>Of interest here is the _closeApp function.  Here&#8217;s the function:</p>
<pre class="brush: jscript; title: ; notranslate">

private function _closeApp()
{
var exitingEvent:Event = new Event(Event.EXITING, false, true);
NativeApplication.nativeApplication.dispatchEvent(exitingEvent);
if (!exitingEvent.isDefaultPrevented())
{
NativeApplication.nativeApplication.exit();
}
}
</pre>
<p>This function creates and dispatches an Event.EXITING event.  This announces our intent to close the application.  The function then checks if the event&#8217;s default behavior is being prevent, that is, is there something else going on with the app that is preventing us from exiting?  BNHD is simple and this case never comes up, but it&#8217;s good to be prepared.  Assuming the default event behavior is not prevented, and it never is, we exit the application.</p>
<p>That&#8217;s the basic rundown of how I setup Beer Near Here Desktop.  Now it is a bit more involved but most of the details are rather specific to BNHD so I don&#8217;t really think they deserve much attention here with two exceptions.  The first is the loading/searching animation that drains the beer glass.  This was a lot of work and I think it turned out awesome.  This will probably be the topic of the next AIR post.</p>
<p>The second is the loading overlay image I mentioned above.  This overlay ended up serving a purpose beyond my initial intent quite nicely.  Originally I planned simply to use it to dim the background while the app was doing any &#8220;thinking&#8221; type operations (loading, searching, et cetera) to draw attention to any pop ups.  It does this well enough but by placing well within the app&#8217;s MXML file I was also able to use it to effectively disable all the controls in the main app window during any thinking operations.</p>
<p>If you load up BNHD and do a search you&#8217;ll see that all of the controls in the main app window become unclickable except for the close button (and, of course, any controls in the popup).  Rather than write a method that enables and disables all these controls I just ordered them within the MXML document such that all of them would be beneath the overlay image except the close button (and popups).  This allows users to exit at any time but not to click buttons they shouldn&#8217;t and cause havoc.  Perhaps a useful trick if you plan to do any custom loading overlays or animations with your application.</p>
<p>Until next time.</p>
<p><a href="/2009/04/07/beer-near-here-part-5-creating-the-art-assets/">Read Part 5</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanmonahan.org/2009/03/10/beer-near-here-desktop-part-4-using-custom-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beer Near Here Desktop Part 3: Setting up the Project in Flex Builder</title>
		<link>http://seanmonahan.org/2009/03/03/beer-near-here-desktop-part-3-setting-up-the-project-in-flex-builder/</link>
		<comments>http://seanmonahan.org/2009/03/03/beer-near-here-desktop-part-3-setting-up-the-project-in-flex-builder/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 02:08:00 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Beer Near Here]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://seanmonahan.org/?p=317</guid>
		<description><![CDATA[After laying down the plan for this project I spent quite a bit of time with the setup in Flex Builder.  If you&#8217;ve read my post, Flex Builder Optimization and You, you&#8217;ll know that I&#8217;ve done a bit of reading on setting up Flex projects for efficient work flows, particularly compile times, and I&#8217;ve come [...]]]></description>
			<content:encoded><![CDATA[<p>After laying down the plan for this project I spent quite a bit of time with the setup in Flex Builder.  If you&#8217;ve read my post, <a href="/2009/01/31/flex-builder-optimization-and-you/">Flex Builder Optimization and You</a>, you&#8217;ll know that I&#8217;ve done a bit of reading on setting up Flex projects for efficient work flows, particularly compile times, and I&#8217;ve come to the conclusion that it&#8217;s super, extra important to setup Flex projects well.  Aside from the usual upshots of enhancing efficiency and the like, it&#8217;s been my experience that a well organized Flex project will load and compile significantly faster that one that&#8217;s been poorly organized.  Trust me, I learned the hard way.</p>
<p><span id="more-317"></span></p>
<p>Beer Near Here Desktop makes use of three libraries, all of which are freely available:</p>
<ol>
<li><a title="as3corelib" href="http://code.google.com/p/as3corelib/">as3corelib</a> for hashing methods</li>
<li><a title="Alex Uhlmann's Flex Distortion Effects" href="http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects.zip">Alex Uhlmann&#8217;s Distortion Effects</a> for distortion effects</li>
<li>My own Flex Library, available <a title="Sean Monahan's Flex Library" href="http://seanmonahan.org/code/flex/library/SeanMonahanLibrary-latest.zip">here</a>.</li>
</ol>
<p>Now there are a number of ways to link these libraries into the BNHD project, but it all pretty much boils down to two methods.  Either I link the project into BNHD&#8217;s build path or I copy the SWC that the library produces into BNHD&#8217;s build path.  My experience has been that neither of these methods is really better than the other and using one over the other largely depends on the nature of the library itself.</p>
<p>Often when people distribute their Flex code it is in the form of a SWC, so there will be plenty of cases where you&#8217;ll simply have to use this method.  In the case of as3corelib, I downloaded the source so that I could disable the packages I didn&#8217;t need, but once I compiled a SWC for the project I included that into BNHD&#8217;s build path rather than the as3corelib project itself.  As3corelib isn&#8217;t going to change beyond my initial modifications and once the SWC is exported I just copy and pasted into into BNHD&#8217;s libs folder.  This allows the BNHD project to be more self-contained as it now no longer relies on the separate as3corelib project.  I then repeated all of this for the distortion effects library.</p>
<p>My own personal Flex library is another matter.  It&#8217;s very immature with few components and effects so as I work on projects like Beer Near Here Desktop I typically pull out a few of the more useful components and put them into my library.  All this is to say, my library changes fairly frequently.  In this case I&#8217;ve found simply adding the project rather than the SWC it produces to be a faster solution.  The downside is that the BNHD project now relies on an external project, so both will have to be present and accounted for in Flex Builder in order to work with BNHD.  Doing this also alleviates the need to continually rebuild my library project during development.</p>
<p>To summarize so far, external libraries, like those listed above should be placed into their own Flex Library Projects.  Any library project that will remain static throughout development should be compiled into a SWC and copied into the main project&#8217;s lib folder.  Any library project that will change frequently should be linked into the main project&#8217;s build path.  Doing all this will prevent you from spending many minutes (or hours) watching your Flex projects compile all while keeping things nicely organized.  I believe this is called a &#8220;win-win&#8221;.</p>
<p>The actual Beer Near Here Desktop project organization is very simple.  In the project&#8217;s source folder I have three files: main.mxml, main-app.xml and style.css.  The first two are the files that define any AIR app and style.css is the master stylesheet for the entire application.  In the source folder I also have an images folder that contains all of the apps images and net.beernearhere folder that contains all the classes and components and whatnots specific to Beer Near Here Desktop.</p>
<p><a href="http://seanmonahan.org/wp-content/uploads/2009/03/bnh-flex-project-layout.png"><img class="alignnone size-medium wp-image-330" title="bnh-flex-project-layout" src="http://seanmonahan.org/wp-content/uploads/2009/03/bnh-flex-project-layout-300x290.png" alt="bnh-flex-project-layout" width="300" height="290" /></a></p>
<p>I really cannot stress enough how much more efficient Flex Builder became once I started shunting things off into libraries and strongly recommend you do the same if you&#8217;re not already.  As for how those projects should be organized, I leave that up to you.  I showed how the BNHD project is setup because I&#8217;ll reference it later, but it&#8217;s pretty standard and really to each his (or her) own.</p>
<p><a title="Read Part 4." href="/2009/03/10/beer-near-here-desktop-part-4-using-custom-chrome/">Read Part 4</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanmonahan.org/2009/03/03/beer-near-here-desktop-part-3-setting-up-the-project-in-flex-builder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Beer Near Here Desktop Part 2: Planning the App</title>
		<link>http://seanmonahan.org/2009/02/24/beer-near-here-desktop-part-2-planning-the-app/</link>
		<comments>http://seanmonahan.org/2009/02/24/beer-near-here-desktop-part-2-planning-the-app/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 06:07:31 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Beer Near Here]]></category>

		<guid isPermaLink="false">http://seanmonahan.org/?p=311</guid>
		<description><![CDATA[As anyone who&#8217;s spent some time writing software knows: planning is paramount.  Mapping out all the features of an app and how they fit together just makes life so much easier.  Since Beer Near Here is a personal project I also factored in my own goals that don&#8217;t necessarily have anything to do with how [...]]]></description>
			<content:encoded><![CDATA[<p>As anyone who&#8217;s spent some time writing software knows: planning is paramount.  Mapping out all the features of an app and how they fit together just makes life so much easier.  Since Beer Near Here is a personal project I also factored in my own goals that don&#8217;t necessarily have anything to do with how the app functions into the planning stage.</p>
<p><span id="more-311"></span></p>
<p>Beer Near Here Desktop (BNHD) is a very simple app.  All it needs to do is take a location as input and display the results.  As such my feature list is very short:</p>
<ul>
<li>Search for beer near a given location</li>
<li>Display results</li>
<li>Display app info</li>
</ul>
<p>This list makes up the core of what BNHD does; nothing more, nothing less.  I told you it was simple.</p>
<p>Additionally I plan to add:</p>
<ul>
<li>Printing</li>
<li>Maps</li>
<li>Directions</li>
</ul>
<p>These three features will add some serious utility to BNHD and take the app from being a neat little experiment to a truly useful desktop tool.  These three features are also the most labor-instense and add little toward my personal goals for developing the app so they&#8217;re getting put off til a later date.</p>
<p>The real purpose of BNHD is give AIR a spin.  Specifically, I wanted to see how dynamic I could make an AIR application using only Flex &#8212; no Flash for animations or anything like that.  I already know I can use Flash to handle animations quite nicely and I&#8217;m interested in seeing Flex &#8230; errr &#8230; flex (sorry) it&#8217;s muscle.</p>
<p>So I hinted at animation being one of my &#8220;personal&#8221; features, to clarify I wanted to have a loading animation that centered around beer.  I also wanted to have a custom skin that really said, &#8220;beer&#8221;.  These two things definitely needed to come together and, if you&#8217;ve used the app you know how.</p>
<p>I also wanted to steal an effect from Apple&#8217;s dashboard widgets.  Most dashboard widgets have an info button that flips the widget over like a card to display settings or other information about the widget.  BNHD is really more of a widget than a full-fledged application so I think this effect fits nicely.  Also it&#8217;s just cool and a bit of a challenge.</p>
<p>This gives me a list of &#8220;personal&#8221; features that looks something like this:</p>
<ul>
<li>Custom skin</li>
<li>Loading animation tied into the custom skin</li>
<li>Flip effect to display app info</li>
</ul>
<p>I now have my list of features for BNHD, but there is still one more thing to consider.  One of the features for BNHD is &#8220;Search for beer near a given location&#8221; which cannot be handled entirely within the app.  The reason this cannot be handled locally is because the database BNHD searches is stored on a remote web server so as part of the search I&#8217;ll be making a request to a web server which means that, as part of the search feature, I&#8217;ll need to consider how this request will be made and handled.</p>
<p>The web server in question is running Drupal so the quick and easy answer is to write a module that handles remote search requests.  I took this a step further by setting up a sub domain of beernearhere.net that exclusively handles remote requests.  Doing this allows me to segregate and better track the traffic on beernearhere.net.  Having a remote client also increases the likelihood of some kind of hack or exploit since I&#8217;m relinquishing some control by creating a remote client that is installed on a user&#8217;s machine so this allows me to quickly shut off all remote requests if something bad happens.</p>
<p>So my revised list of features to implement for a version 1.0 release are:</p>
<ul>
<li>Create a custom skin for the app</li>
<li>Search for beer near a given location by making a request to a remote server</li>
<li>Display a loading animation that integrates with the custom skin while waiting for the response to the search request</li>
<li>Display app info using a flip effect</li>
</ul>
<p>Pretty straightforward stuff.  Next time we&#8217;ll start by setting up our project and creating the custom skin.</p>
<p><a title="Part 3 of the series." href="/2009/03/03/beer-near-here-desktop-part-3-setting-up-the-project-in-flex-builder/">Read Part 3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanmonahan.org/2009/02/24/beer-near-here-desktop-part-2-planning-the-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beer Near Here Desktop</title>
		<link>http://seanmonahan.org/2009/02/23/beer-near-here-desktop/</link>
		<comments>http://seanmonahan.org/2009/02/23/beer-near-here-desktop/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 00:57:26 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Beer Near Here]]></category>

		<guid isPermaLink="false">http://seanmonahan.org/?p=305</guid>
		<description><![CDATA[One of the coolest aspects of Beer Near Here, in my humble opinion, is the desktop version.  Beer Near Here is primarily a website about information, specifically, displaying information in a legible manner.  That sort of site doesn&#8217;t mesh well with a cool, out-there design or lots of Flash or Javascript effects, which is why [...]]]></description>
			<content:encoded><![CDATA[<p>One of the coolest aspects of <a title="Visit Beer Near Here" href="http://beernearhere.net">Beer Near Here</a>, in my humble opinion, is the <a title="Beer Near Here Desktop" href="http://beernearhere.net/desktop">desktop version</a>.  Beer Near Here is primarily a website about information, specifically, displaying information in a legible manner.  That sort of site doesn&#8217;t mesh well with a cool, out-there design or lots of Flash or Javascript effects, which is why developing BNH Desktop was so refreshing.  Yes, the app is still primarily about displaying information to the user but in targeting AIR I&#8217;m free to embrace all the cool animations and effects offered by that platform.</p>
<p><span id="more-305"></span></p>
<p>I could do much of what BNH Desktop does on the web, but I&#8217;d have to rely on users having Flash and for the users that don&#8217;t, well, I have to handle them as well, usually by gracefully degrading the experience.  All of this is a lot of work and testing and, again, in my humble opinion, not usually worth it.  From a design standpoint I think a website should be embraced for what it is and not shoehorned into some Flash app that just happens to run in a web browser.</p>
<p>I&#8217;ll now step down off my soapbox and get back to the point of this post: Beer Near Here Desktop is a cool example of an AIR application and I want to cut it open and share all it&#8217;s secrets.  When I decided to write this app the first thing I did was check out what else is out there for AIR and something that kept showing up was Kuler for AIR.</p>
<p><a title="Visit kuler.adobe.com" href="http://kuler.adobe.com">Kuler</a>, is an Adobe application for creating color swatches and, from everything I read, the AIR version is something that was written to show off some of the cool things you can do with AIR.  And sure enough it does show these things off.  It has custom skin and some neat effects.  The trouble is that there is no explanation of how to accomplish any of this.  It&#8217;s almost a tease, &#8220;See, you can do all this cool stuff&#8230;but we&#8217;re not going to tell you how.&#8221;</p>
<p>Undeterred, I went on to do some more Googling and reading with the end result being Beer Near Here Desktop.  You should <a title="Get Beer Near Here Desktop" href="http://beernearhere.net/desktop">check it out</a>.  FYI, I&#8217;m not paying $300 to sign my code with Verisign so you&#8217;ll have to just trust me on the install.</p>
<p>Some of the neat features of BNH Desktop include:</p>
<ul>
<li>A custom skin.  In Flex/AIR parlance this is &#8220;custom chrome&#8221;.</li>
<li>A loading/waiting animation that integrates with the skin.</li>
<li>A flip effect.</li>
<li>Custom roll-over buttons.</li>
</ul>
<p>So now you know you can do these things and I aim to explain them as well.  But for that you&#8217;ll have to stay tuned until next time as I want to give each feature it&#8217;s due.</p>
<p><a href="/2009/02/24/beer-near-here-desktop-part-2-planning-the-app/">Read Part 2</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanmonahan.org/2009/02/23/beer-near-here-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

