<?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>Mike Chambers &#187; air</title>
	<atom:link href="http://www.mikechambers.com/blog/tag/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog</link>
	<description>code = joy</description>
	<lastBuildDate>Sun, 15 Jan 2012 05:46:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Monitoring System Volume changes with Adobe AIR</title>
		<link>http://www.mikechambers.com/blog/2009/02/24/monitoring-system-volume-changes-with-adobe-air/</link>
		<comments>http://www.mikechambers.com/blog/2009/02/24/monitoring-system-volume-changes-with-adobe-air/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 09:32:28 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as3corelib]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1668</guid>
		<description><![CDATA[I am at FITC Amsterdam this week, where I had a talk on Desktop Development with Adobe AIR. One of the things I showed was how to get notifications when new volumes / drives are added / removed to a machine. This could be useful if for example, you application needs to know when a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2009%2F02%2F24%2Fmonitoring-system-volume-changes-with-adobe-air%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I am at FITC Amsterdam this week, where I had a talk on Desktop Development with Adobe AIR. One of the things I showed was how to get notifications when new volumes / drives are added / removed to a machine. This could be useful if for example, you application needs to know when a new CD Rom or USB drive has been added or removed to the user&#8217;s system.<br />
<span id="more-1668"></span><br />
Anyways, I create a reusable class called <a href="http://code.google.com/p/as3corelib/source/browse/trunk/src/com/adobe/air/filesystem/VolumeMonitor.as">VolumeMonitor</a> that makes it very easy to monitor volume changes. I have checked in the code into the <a href="http://code.google.com/p/as3corelib/">as3corelib library</a> under the AIR package. Its not in the build yet, but once I write some docs and unit tests, and check for some bugs, Ill add it to the next build.</p>
<p>Here is an example of the code in use:</p>
<div class="highlight">
<pre><span style="color: #008000; font-weight: bold">import</span> com.adobe.air.filesystem.events.FileMonitorEvent<span style="color: #666666">;</span>
<span style="color: #008000; font-weight: bold">import</span> com.adobe.air.filesystem.VolumeMonitor<span style="color: #666666">;</span>

<span style="color: #008000; font-weight: bold">private</span> <span style="color: #008000; font-weight: bold">var</span> monitor<span style="color: #666666">:</span>com.adobe.air.filesystem.VolumeMonitor<span style="color: #666666">;</span>

<span style="color: #008000; font-weight: bold">private</span> <span style="color: #008000; font-weight: bold">function</span> onApplicationComplete()<span style="color: #666666">:</span>void
{
	monitor <span style="color: #666666">=</span> <span style="color: #008000; font-weight: bold">new</span> com.adobe.air.filesystem.VolumeMonitor();
	monitor.addEventListener(FileMonitorEvent.ADD_VOLUME<span style="color: #666666">,</span> onAddVolume);
	monitor.addEventListener(FileMonitorEvent.REMOVE_VOLUME<span style="color: #666666">,</span> onRemoveVolume);
	monitor.watch();
}

<span style="color: #008000; font-weight: bold">private</span> <span style="color: #008000; font-weight: bold">function</span> onAddVolume(e<span style="color: #666666">:</span>FileMonitorEvent)<span style="color: #666666">:</span>void
{
	<span style="color: #0000FF">trace</span>(<span style="color: #BA2121">&quot;Volume added : &quot;</span> <span style="color: #666666">+</span> e.file.url);
}

<span style="color: #008000; font-weight: bold">private</span> <span style="color: #008000; font-weight: bold">function</span> onRemoveVolume(e<span style="color: #666666">:</span>FileMonitorEvent)<span style="color: #666666">:</span>void
{
	<span style="color: #0000FF">trace</span>(<span style="color: #BA2121">&quot;Volume removed : &quot;</span> <span style="color: #666666">+</span> e.file.url);
}
</pre>
</div>
<p>&nbsp;</p>
<p>You can check out the class by grabbing the <a href="http://code.google.com/p/as3corelib/source/checkout">as3corelib source</a>. If you poke around you will notice some other classes that I have added to the air package, but Ill post about those later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2009/02/24/monitoring-system-volume-changes-with-adobe-air/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>AIR Bug : AIR Install dialog is displayed in wrong language</title>
		<link>http://www.mikechambers.com/blog/2009/02/05/air-bug-air-install-dialog-is-displayed-in-wrong-language/</link>
		<comments>http://www.mikechambers.com/blog/2009/02/05/air-bug-air-install-dialog-is-displayed-in-wrong-language/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 18:49:18 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[air]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1662</guid>
		<description><![CDATA[There is a known issue with the Adobe AIR 1.5 install on Mac where in certain circumstances the install dialog will appear in the wrong language (usually Japanese or Chinese). If you run into this, here are the steps to work around it: Go to System Preferences Select International Make some changes to the Language [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2009%2F02%2F05%2Fair-bug-air-install-dialog-is-displayed-in-wrong-language%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There is a known issue with the Adobe AIR 1.5 install on Mac where in certain circumstances the install dialog will appear in the wrong language (usually Japanese or Chinese). If you run into this, here are the steps to work around it:</p>
<ol>
<li>Go to System Preferences</li>
<li>Select International</li>
<li>Make some changes to the Language list: add a language, re-order a language. Also, might want to make sure English is the first one in his list at this point.</li>
<li>Try installing Air again.</li>
</ol>
<p>This is a known issue and will be fixed in the next AIR dot release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2009/02/05/air-bug-air-install-dialog-is-displayed-in-wrong-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

