<?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>Swami Charan&#039;s Blog &#187; AIR</title>
	<atom:link href="http://www.swamicharan.com/blog/category/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.swamicharan.com/blog</link>
	<description>My personal blog...</description>
	<lastBuildDate>Sat, 17 Jul 2010 13:02:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Its 2nd Birthday of ADOBE AIR</title>
		<link>http://www.swamicharan.com/blog/air/its-2nd-birthday-of-adobe-air/</link>
		<comments>http://www.swamicharan.com/blog/air/its-2nd-birthday-of-adobe-air/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 07:14:34 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=742</guid>
		<description><![CDATA[Its 2nd Birthday for ADOBE AIR. AIR was started on February 25th, 2008 and with  in this 2 years, it grew rapidly and adopted by many as better option for creating RIA for Desktop. You can see AIR Applications now everywhere in a wide variety of domains from Entertainment, News, Social Networking, eLearning, Video etc. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-743" title="sidebar-logo2" src="http://www.swamicharan.com/blog/wp-content/uploads/2010/02/sidebar-logo2.gif" alt="sidebar-logo2" width="160" height="85" />Its 2nd Birthday for ADOBE AIR. AIR was started on February 25th, 2008 and with  in this 2 years, it grew rapidly and adopted by many as better option for creating RIA for Desktop. You can see AIR Applications now everywhere in a wide variety of domains from Entertainment, News, Social Networking, eLearning, Video etc.</p>
<p>Its really great to use such a product and lets flourish it further...</p>
<p>Looking forward for the exciting new application on AIR...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/its-2nd-birthday-of-adobe-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multitouch in AIR 2.0 and Flash Player 10.1</title>
		<link>http://www.swamicharan.com/blog/flash/multitouch-in-air-2-0-and-flash-player-10-1/</link>
		<comments>http://www.swamicharan.com/blog/flash/multitouch-in-air-2-0-and-flash-player-10-1/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:55:29 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[AIR 2.0]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flash Player 10.1 Features]]></category>
		<category><![CDATA[Gesture capabilities]]></category>
		<category><![CDATA[MAX 09]]></category>
		<category><![CDATA[Multi-touch]]></category>
		<category><![CDATA[Multi-touch on AIR]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=683</guid>
		<description><![CDATA[You might have heard by now about all the new features that is part of Flash Player 10.1 and AIR 2.0. One of the exciting features is Multi-touch and Gestures capabilities. Check out this video where Kevin Lynch demoing some of the multi-touch capabilities during Keynote at MAX Conference. For Multi-touch to work, the hardware [...]]]></description>
			<content:encoded><![CDATA[<p>You might have heard by now about all the new features that is part of Flash Player 10.1 and AIR 2.0. One of the exciting features is <strong>Multi-touch and Gestures capabilities</strong>.</p>
<p>Check out this video where Kevin Lynch demoing some of the multi-touch capabilities during Keynote at <strong>MAX Conference</strong>.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/va33sU-_Bzk&#038;fs=1" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/va33sU-_Bzk&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>For Multi-touch to work, the hardware should support Multi-touch events.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/flash/multitouch-in-air-2-0-and-flash-player-10-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sample AIR Apps for New Features of AIR 2 BETA</title>
		<link>http://www.swamicharan.com/blog/air/sample-air-apps-for-new-features-of-air-2-beta/</link>
		<comments>http://www.swamicharan.com/blog/air/sample-air-apps-for-new-features-of-air-2-beta/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 06:02:57 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[AIR 2 Applications]]></category>
		<category><![CDATA[AIR 2 BETA]]></category>
		<category><![CDATA[AIR 2 Features]]></category>
		<category><![CDATA[Sample AIR Apps]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=592</guid>
		<description><![CDATA[Y'day Adobe  has released its BETA versions of AIR 2 with a bunch of incredible new Features. These new Features help us build a wide vairety of new applications with new capabilities which were not there in AIR 1. By this time you might all be knowing all the new Features that are part of [...]]]></description>
			<content:encoded><![CDATA[<p>Y'day <strong>Adobe </strong> has released its BETA versions of AIR 2 with a bunch of incredible new Features. These new Features help us build a wide vairety of new applications with new capabilities which were not there in AIR 1.</p>
<p>By this time you might all be knowing all the new Features that are part of AIR 2 BETA. Still to know more about new Features, check out <a href="http://blogs.adobe.com/cantrell/archives/2009/10/everything_new_in_air_2.html" target="_blank"><span style="color: #0000ff;"><strong>Christian Cantrell's post</strong></span></a>.</p>
<p>There are some very good Sample apps in Adobe Library which were built based on these new capabilities and features.</p>
<p><strong>MultiTouch Support:</strong> This is perhaps the most exciting feature as AIR 2 and Flash player 10.1 is going to support multi-touch on platforms like Windows 7 and MAC's Snow Leopard. Here are some apps which demonstrate the support for multi-touch:</p>
<ul>
<li><strong>GeoTest</strong>: Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/geotest.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/geotest.zip" target="_blank">Source</a></li>
<li><strong>PhotoPhysics: </strong>Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/photophysics.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/photophysics.zip" target="_blank">Source</a></li>
<li><strong>SpriteFract:</strong> Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/spritefract.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/spritefract.zip" target="_blank">Source</a></li>
<li><strong>TouchTest:</strong> Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/touchtest.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/touchtest.zip" target="_blank">Source</a></li>
</ul>
<p><span id="more-592"></span></p>
<p><strong>Storage Volume Detection:</strong> With AIR 2, apps can detect when any storage device like Camera, USB are connected to computer. Adobe Library had an application <strong>FileTile</strong> which demonstrates the feature of detecting any external device and will open the files in default application.</p>
<p>Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/filetile.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/filetile.zip" target="_blank">Source</a>.</p>
<p><strong>Microphone Data Access:</strong> AIR 2 gives us the support to access data from Microphone connected to the computer either for recording or processing without any need of any server. There is an application <strong>Microphone</strong> which can record and playback the different playback speeds supported.</p>
<p>Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/microphone.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/microphone.zip" target="_blank">Source</a>.</p>
<p><strong>File Promises:</strong> With this feature AIR 2 will allow us to drap-drop the files which are not been created yet and are remote. With this feature support, you can implement drag-drop file from a FTP server directly to your AIR application. This feature is for Windows and MAC only.</p>
<p><strong>S3E</strong> application provides a graphical front-end to your Amazon S3 account to demonstrate this feature.</p>
<p>Download <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/s3e.air" target="_blank">Installer</a>, <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/s3e.zip" target="_blank">Source</a>.</p>
<p><strong>Native Process API:</strong> Using this new functionality can now deploy their apps with operating-specific installers like .exe, .dmg, .rpm, and .deb instead of an .air installer file. Adobe released application <strong>SearchCentral.</strong> You can get the <a href="http://download.macromedia.com/pub/labs/air/2/b1/samples/searchcentral.zip" target="_blank">source </a>of application.</p>
<p>Try out these applications and get to know these new Features of AIR 2 more...</p>
<p>Here is a brief list of other Features which AIR 2 has introduced:</p>
<ul>
<li>Global Error handling</li>
<li>Enhanced Printing Support</li>
<li>Updated Webkit</li>
<li>Improved Ipv6 Support</li>
<li>Increased maximum size of Native Window from 2880x2880 to 4095x4095</li>
<li>Server Sockets Support</li>
<li>DNS Lookup</li>
<li>Network Interface Enumeration</li>
<li>Database Transaction Savepoints</li>
<li>Screen Reader Support for Windows</li>
<li>IME API and IME Text Input Enhancement</li>
<li>Smaller Runtime Installer Size</li>
<li>Improved CPU Usage and Low Memory Usage</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/sample-air-apps-for-new-features-of-air-2-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Air 2 BETA available on Adobe Labs</title>
		<link>http://www.swamicharan.com/blog/air/air-2-beta-available-on-adobe-labs/</link>
		<comments>http://www.swamicharan.com/blog/air/air-2-beta-available-on-adobe-labs/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 05:26:53 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Adobe labs]]></category>
		<category><![CDATA[AIR 2]]></category>
		<category><![CDATA[AIR 2 BETA]]></category>
		<category><![CDATA[BETA of AIR 2]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=587</guid>
		<description><![CDATA[People who are waiting for BETA of AIR 2 dont have to wait any further as its there in ADOBE LABS for download. You can download both AIR SDK and Runtime for different OS 's like Windows , MAC and Linux. Adobe labs says: "Adobe AIR 2 is in the early stages of development which means it contains [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-588" title="small" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/11/small.png" alt="small" width="80" height="80" />People who are waiting for BETA of AIR 2 dont have to wait any further as its there in <strong><a href="http://labs.adobe.com/downloads/air2.html" target="_blank"><span style="color: #0000ff;">ADOBE LABS</span></a></strong> for download.</p>
<p>You can download both AIR SDK and Runtime for different OS 's like Windows , MAC and Linux.</p>
<p>Adobe labs says: "<em>Adobe AIR 2 is in the early stages of development which means it contains bugs, and not all features are fully implemented. This software is for evaluation use only, and should not be used for any mission-critical work.</em>"</p>
<p>Goahead, download and check it out...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/air-2-beta-available-on-adobe-labs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADOBE AIR 2.0 BETA Notification</title>
		<link>http://www.swamicharan.com/blog/air/adobe-air-2-0-beta-notification/</link>
		<comments>http://www.swamicharan.com/blog/air/adobe-air-2-0-beta-notification/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 06:51:10 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Adobe labs]]></category>
		<category><![CDATA[Adobe Membership]]></category>
		<category><![CDATA[AIR 2.0]]></category>
		<category><![CDATA[AIR 2.0 BETA]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=485</guid>
		<description><![CDATA[Want to know when ADOBE AIR 2.0 BETA is going to get released? All you need to do is to get Adobe Membership. Adobe membership is free and registration only takes a minute. As a member, you will have access to Adobe Labs downloads, sample applications, services, and special community areas including forums and wikis [...]]]></description>
			<content:encoded><![CDATA[<p>Want to know when ADOBE AIR 2.0 BETA is going to get released? All you need to do is to get <strong>Adobe Membership</strong>.</p>
<p>Adobe membership is free and registration only takes a minute. As a member, you will have access to Adobe Labs downloads, sample applications, services, and special community areas including forums and wikis as well as access to membership benefits on <a href="http://www.adobe.com/" target="_self"><span style="color: #0000ff;">Adobe.com</span></a>.</p>
<p>With this membership, <a href="https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_air2_signup" target="_self"><span style="color: #0000ff;"><strong>ADOBE LABS</strong> </span></a>provides access to the software, you can provide comments, ideas, feature requests and many more.</p>
<p>Get youself <strong><a href="https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_air2_signup" target="_self"><span style="color: #0000ff;">Adobe Memership</span></a></strong> now...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/adobe-air-2-0-beta-notification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some useful Adobe AIR Apps you should know</title>
		<link>http://www.swamicharan.com/blog/air/useful-adobe-air-apps-you-should-know/</link>
		<comments>http://www.swamicharan.com/blog/air/useful-adobe-air-apps-you-should-know/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 13:08:08 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR Applications]]></category>
		<category><![CDATA[RIA]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=419</guid>
		<description><![CDATA[Adobe AIR , as you all know, is platform-independent runtime with which web developers can use their expertise in RIA development to create Applications for Desktops. There are some thousands of AIR applications available now for use. HONGKIAT listed out some nice AIR applications which can be useful in our day-to-day activities. I found some [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Adobe AIR</strong> , as you all know, is platform-independent runtime with which web developers can use their expertise in RIA development to create Applications for Desktops.</p>
<p>There are some thousands of AIR applications available now for use.</p>
<p><strong><a href="http://www.hongkiat.com/blog/60-useful-adobe-air-applications-you-should-know/" target="_self"><span style="color: #0000ff;">HONGKIAT</span></a></strong> listed out some nice AIR applications which can be useful in our day-to-day activities. I found some applications which i dint knew about from this article.</p>
<p>Install and use these applications. Make this world full of AIR <img src='http://www.swamicharan.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/useful-adobe-air-apps-you-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR 2.0 Enhancements &#8211; Overview</title>
		<link>http://www.swamicharan.com/blog/air/air-2-0-enhancements-overview/</link>
		<comments>http://www.swamicharan.com/blog/air/air-2-0-enhancements-overview/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 15:13:27 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR 2.0]]></category>
		<category><![CDATA[AIR capabilities]]></category>
		<category><![CDATA[AIR Enhancements]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=358</guid>
		<description><![CDATA[As you all know that information about AIR 2.0 and its new enhancements is released recently. People who are already working on AIR 1.0 will find it very useful to know what new enhancements AIR 2.0 is going to offer. Elad Elron made an excellent post about these new enhancements and capabilities. I am sure this [...]]]></description>
			<content:encoded><![CDATA[<p>As you all know that information about AIR 2.0 and its new enhancements is released recently.</p>
<p>People who are already working on AIR 1.0 will find it very useful to know what new enhancements AIR 2.0 is going to offer.</p>
<p><span style="color: #0000ff;"><a href="http://www.insideria.com/2009/10/air-2-enhancements-complete-ov.html" target="_self"><strong><span style="color: #0000ff;">Elad Elron</span></strong></a><strong> </strong><span style="color: #000000;">made an excellent post about these new enhancements and capabilities.</span></span></p>
<p><span style="color: #0000ff;"><span style="color: #000000;">I am sure this information is useful to all RIA developers.</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/air-2-0-enhancements-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag-drop on non-list based controls in Flex/AIR</title>
		<link>http://www.swamicharan.com/blog/flex/drag-drop-on-non-list-based-controls-in-flexair/</link>
		<comments>http://www.swamicharan.com/blog/flex/drag-drop-on-non-list-based-controls-in-flexair/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 14:25:57 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[acceptDragDrop]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[doDrag]]></category>
		<category><![CDATA[Drag and drop]]></category>
		<category><![CDATA[Drag Initiator]]></category>
		<category><![CDATA[Drag Manager]]></category>
		<category><![CDATA[drag Proxy]]></category>
		<category><![CDATA[dragComplete]]></category>
		<category><![CDATA[dragDrop]]></category>
		<category><![CDATA[dragEnabled]]></category>
		<category><![CDATA[dragEnter]]></category>
		<category><![CDATA[dragExit]]></category>
		<category><![CDATA[dragOver]]></category>
		<category><![CDATA[DragSource]]></category>
		<category><![CDATA[dragStart]]></category>
		<category><![CDATA[Drop target]]></category>
		<category><![CDATA[dropEnabled]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[non-list based controls]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=338</guid>
		<description><![CDATA[The List-based controls like List, DataGrid etc will have support for drag and drop. You use drag-drop on list-based contols by enabling properties like dragEnabled and dropEnabled to true. We can implement this drag-drop on non-list based controls as well. To do that we need to handle drag and drop events. Drag-drop Events for Drag [...]]]></description>
			<content:encoded><![CDATA[<p>The List-based controls like List, DataGrid etc will have support for drag and drop. You use drag-drop on list-based contols by enabling properties like <em>dragEnabled </em>and <em>dropEnabled</em> to <em>true</em>. We can implement this drag-drop on non-list based controls as well. To do that we need to handle drag and drop events.</p>
<p><strong>Drag-drop Events for Drag Initiator</strong></p>
<ul>
<li><em><strong>mouseDown, mouseMove</strong></em>: <em>mouseDown</em> event will be dispatched when a control is selected with Mouse button down. <em>mouseMove</em> is dispatched when mouse moves.</li>
<li><em><strong>dragStart</strong></em>: this event is dispatched by a list-based control when a drag operation starts. Its handled internally, no need to handle it while implementing on non-list based controls.</li>
<li><em><strong>dragComplete</strong></em>: Dispatched when the drag completes.</li>
</ul>
<p>If you want to implement drag-drop for any component, you must implement either <em>mouseDown</em> or <em>mouseMove</em> and optionally <em>dragComplete</em> event. In case of List-based controls, once <em>dragEnabled</em> property is set to <em>true</em>, Flex automatically adds event handlers for <em>dragStart</em> and <em>dragComplete</em> events.</p>
<p><span id="more-338"></span></p>
<p><strong>Drag-Drop events for Drop Target:</strong></p>
<ul>
<li><em><strong>dragEnter</strong></em>: Dispatched when drag proxy moves onto drop target from outside the drop target. Event handler for this must be defined for the component. <em>DragManager.acceptDragDrop()</em> method must be called by event handler to accept drop.</li>
<li><em><strong>dragOver</strong></em>: this event is dispatched when mouse is moved over drop target after <em>dragEnter</em> event.</li>
<li><em><strong>dragDrop</strong></em>: Dispatched when the mouse is released over drop target.</li>
<li><em><strong>dragExit</strong></em>: This event is dispatched when user moves the drag proxy off the target withour dropping the data on the target.</li>
</ul>
<p>While implementing darg-drop for non-list based controls, we must implement event handlers for <em>dragEnter</em> and <em>dragDrop</em> events and optionally for the remaining two events. Incase of list-based controls, when <em>dropEnabled</em> is set to <em>true</em>, Flex automatically adds event handlers for all the events.</p>
<p><strong>Steps of Drag-Drop Operation:</strong></p>
<ol>
<li>First make a component drag initiator. Use <em>mouseDown</em> or <em>mouseMove</em> event handler to start the drag-drop operation. <em>mx.core.DragSource</em> instance is created that contains the data to be dragged and specifies the format of data. <em>mx.managers.DragManager.doDrag()</em> method should be called to initiate the drap-drop operation.</li>
<li>With mouse button down, if the mouse is moved across the application, Flex displays drag proxy image.</li>
<li>When this drag proxy is moved over a flex component (which had <em>dragEnter</em> event handler),  <em>dragEnter</em> event handler examines the <em>DragSource</em> object to determine whether the data being dragged is in accepted format. To accept the drop, the event handler calls <em>DragManager.acceptDragDrop() </em>method. This method must be called in order for the drop target to receive <em>dragOver</em>, <em>dragExit</em> and <em>dragDrop</em> events.</li>
<li>If the user releases the drag proxy on the drop target, Flex dispatched <em>dragDrop </em>event. The drop target must define event handler for <em>dragDrop</em> event to  add the drag data to the drop target.</li>
</ol>
<p><strong>Simple Drag-Drop Example:</strong></p>
<pre class="brush: php">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="300" height="300"&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.core.DragSource;
			import mx.managers.DragManager;
			import mx.events.*;
			import mx.containers.Canvas;

			private function mouseMoveHandler(event:MouseEvent):void{
				var dragInitiator:Canvas=Canvas(event.currentTarget);

				var dragColor:int = dragInitiator.getStyle('backgroundColor');

				var ds:DragSource = new DragSource();

				ds.addData(dragColor, 'color');

				DragManager.doDrag(dragInitiator, ds, event);
			}

			private function dragEnterHandler(event:DragEvent):void{
				if(event.dragSource.hasFormat('color')){
					var dropTarget:Canvas=Canvas(event.currentTarget);
					DragManager.acceptDragDrop(dropTarget);
				}
			}

			private function dragDropHandler(event:DragEvent):void{
				var data:Object = event.dragSource.dataForFormat('color');
				myCanvas.setStyle("backgroundColor", data);
			}
		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:HBox x="40" y="40"&gt;
		&lt;mx:VBox&gt;
			&lt;mx:Canvas width="30" height="30" backgroundColor="red" borderStyle="solid" mouseMove="mouseMoveHandler(event)" /&gt;
			&lt;mx:Canvas width="30" height="30" backgroundColor="blue" borderStyle="solid" mouseMove="mouseMoveHandler(event)" /&gt;
			&lt;mx:Canvas width="30" height="30" backgroundColor="green" borderStyle="solid" mouseMove="mouseMoveHandler(event)" /&gt;
		&lt;/mx:VBox&gt;
		&lt;mx:VBox&gt;
			&lt;mx:Label text="Drag into this Canvas" /&gt;
			&lt;mx:Canvas id="myCanvas" width="100" height="100" backgroundColor="#FFFFFF" borderStyle="solid" dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)" /&gt;
		&lt;/mx:VBox&gt;
		&lt;/mx:HBox&gt;
&lt;/mx:Application&gt;</pre>
<p class="brush: php">In this example, we have a canvas to the right which is drop target (which has <em>dragEnter</em> and <em>dragDrop</em> event handlers). Dragging any smaller canvas from the left to the right canvas fills the background of the drop target with the color of the drag initiator.</p>
<p class="brush: php"><strong>Result:</strong></p>
<p class="brush: php">
<object width="300" height="300">
<param name="movie" value="http://www.swamicharan.com/blog/wp-content/uploads/2009/10/DragDrop1.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="300" height="300" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/10/DragDrop1.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p class="brush: php"><strong> </strong></p>
<p class="brush: php"><strong>Another Example</strong></p>
<p class="brush: php">In the above example, we have the drag Initiator was external to the drop target. We can make the children of a drop target as drag initiators as well.</p>
<pre class="brush: php">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="400"&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.managers.DragManager;
            import mx.core.DragSource;
            import mx.events.DragEvent;
            import flash.events.MouseEvent;

            private function mouseMoveHandler(event:MouseEvent):void{
            	var dragInitiator:Canvas=Canvas(event.currentTarget);
                var ds:DragSource = new DragSource();
                ds.addData(dragInitiator, "canvas");               

                DragManager.doDrag(dragInitiator, ds, event);

            }

            private function dragEnterHandler(event:DragEvent):void {
                if (event.dragSource.hasFormat("canvas"))
                {
                    DragManager.acceptDragDrop(Canvas(event.currentTarget));
                }
            }

            private function dragDropHandler(event:DragEvent):void {
                Canvas(event.dragInitiator).x =
                    Canvas(event.currentTarget).mouseX;
                Canvas(event.dragInitiator).y =
                    Canvas(event.currentTarget).mouseY;
            }

		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:Canvas id="myCanvas" x="20" y="20" width="300" height="300" backgroundColor="#FFFFFF" borderStyle="solid" dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)"&gt;
		&lt;mx:Canvas id="thumb" width="50" height="50" borderStyle="solid" backgroundColor="red" mouseMove="mouseMoveHandler(event)" /&gt;
	&lt;/mx:Canvas&gt;
&lt;/mx:Application&gt;</pre>
<p class="brush: php"> In this example, we can drag-drop the red canvas all across the white canvas.</p>
<p class="brush: php"><strong>Result:</strong></p>
<p class="brush: php">
<object width="400" height="400">
<param name="movie" value="http://www.swamicharan.com/blog/wp-content/uploads/2009/10/DragDrop2.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="400" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/10/DragDrop2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p class="brush: php"><strong>User-Defined Drag Proxy:</strong></p>
<p class="brush: php">In the above example, while dragging a default drag proxy will be displayed. We can add our own drag proxy image.</p>
<p class="brush: php">In <em>mouseDown</em> or <em>mouseMove</em> event handler, you can optionally specify the drap proxy in <em>doDrag()</em> method. Here are the optional properties to be given incase of user-defined drag proxy:</p>
<ul>
<li>
<div class="brush: php"><em>dragImage:</em> Image that specifies the drag proxy</div>
</li>
<li>
<div class="brush: php"><em>xOffset:</em> Specifies the x offset in pixels for the <em>dragImage</em>. Usually it will be negative number.</div>
</li>
<li>
<div class="brush: php"><em>yOffset:</em> Specifies the y offset in pixels for <em>dragImage.</em>Usually it will be negative number.</div>
</li>
<li>
<div class="brush: php"><em>imageAlpha: </em>A number between 0 and 1.0, which specifies the alpha for the drag proxy image. The default value is 0.5</div>
</li>
</ul>
<p class="brush: php"> </p>
<pre class="brush: php">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.controls.Image;
			import mx.managers.DragManager;
            import mx.core.DragSource;
            import mx.events.DragEvent;
            import flash.events.MouseEvent;

            // Embed icon image.
            [Embed(source='assets/proxy.jpg')]
            public var proxyImage:Class;

            private function mouseMoveHandler(event:MouseEvent):void{
            	var dragInitiator:Canvas=Canvas(event.currentTarget);
                var ds:DragSource = new DragSource();
                ds.addData(dragInitiator, "canvas");  

                var myProxy:Image = new Image();
                myProxy.source = proxyImage;
                myProxy.width = 15;
                myProxy.height = 15;             

                DragManager.doDrag(dragInitiator, ds, event, myProxy, -15, -15, 0.8);

            }

            private function dragEnterHandler(event:DragEvent):void {
                if (event.dragSource.hasFormat("canvas"))
                {
                    DragManager.acceptDragDrop(Canvas(event.currentTarget));
                }
            }

            private function dragDropHandler(event:DragEvent):void {
                Canvas(event.dragInitiator).x =
                    Canvas(event.currentTarget).mouseX;
                Canvas(event.dragInitiator).y =
                    Canvas(event.currentTarget).mouseY;
            }

		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:Canvas id="myCanvas" x="20" y="20" width="300" height="300" backgroundColor="#FFFFFF" borderStyle="solid" dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)"&gt;
		&lt;mx:Canvas id="thumb" width="50" height="50" borderStyle="solid" backgroundColor="red" mouseMove="mouseMoveHandler(event)" /&gt;
	&lt;/mx:Canvas&gt;
&lt;/mx:Application&gt;</pre>
<p class="brush: php">You can provide what ever image you want as your drag proxy. Make sure you give the <em>height</em> and <em>width</em> for the drag proxy image, without which it wont work.</p>
<p class="brush: php"><strong>Result:</strong></p>
<p class="brush: php">
<object width="400" height="400">
<param name="movie" value="http://www.swamicharan.com/blog/wp-content/uploads/2009/10/dragProxy.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="400" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/10/dragProxy.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p class="brush: php">These are the basics for implementing drap-drop for non-list based controls for Flex/AIR.</p>
<p class="brush: php">You can experiment more on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/flex/drag-drop-on-non-list-based-controls-in-flexair/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Creating Pop-Up Windows in Flex/AIR</title>
		<link>http://www.swamicharan.com/blog/flex/creating-pop-up-windows-in-flexair/</link>
		<comments>http://www.swamicharan.com/blog/flex/creating-pop-up-windows-in-flexair/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:05:52 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[centerPopUp]]></category>
		<category><![CDATA[createPopUp]]></category>
		<category><![CDATA[modalTransparency]]></category>
		<category><![CDATA[popup]]></category>
		<category><![CDATA[PopUpManager]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=295</guid>
		<description><![CDATA[Pop-ups are a vital part of any application. In this post, we are going to look into how a popup window can be designed in FLEX/AIR. PopUpManager class is the one used to create new top-level windows and can be used to place above all the visible windows (making it a popUp). You can remove [...]]]></description>
			<content:encoded><![CDATA[<p>Pop-ups are a vital part of any application. In this post, we are going to look into how a popup window can be designed in FLEX/AIR.</p>
<p><em>PopUpManager</em> class is the one used to create new top-level windows and can be used to place above all the visible windows (making it a popUp). You can remove popUps as well using this class.</p>
<p>We can make these windows  modal as well.</p>
<p>We can create a popUp using <em>createPopUp</em> method.</p>
<pre> public static createPopUp(parent:DisplayObject, class:Class,
    modal:Boolean = false):IFlexDisplayObject</pre>
<p>Here <em>parent</em> is the window over which the popup is going to appear, <em>class</em> is the reference to the custom MXML component which is going to act as pop-up, <em>modal </em>represents the Boolean value to decide on whether the popup is going to be modal or not.</p>
<p><span id="more-295"></span></p>
<p>First we will create a custom MXML component, which is going to be our popUp. For that goto <strong>File-&gt;New-&gt;MXML Component</strong>. Give a name <em>myCanvas</em>. We are going to create this new component with a <em>canvas</em>.</p>
<pre class="brush: php;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="300" height="112"  borderColor="#000000" cornerRadius="10" borderStyle="solid"  backgroundColor="#A19999"&gt;
	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.managers.PopUpManager;

			private var myText:String ="This is a Sample Pop-up Window based on a Canvas Component. Click 'OK' to remove this popup!";
		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:VBox width="100%" height="99" paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5"&gt;
		&lt;mx:Text text="{myText}"  width="270" height="59"/&gt;
		&lt;mx:Button label="OK" id="myBtn" click="PopUpManager.removePopUp(this)" textAlign="center"/&gt;
	&lt;/mx:VBox&gt;

&lt;/mx:Canvas&gt;</pre>
<p class="brush: php;">As you can see above, our new MXML component is based on <em>canvas</em>. It has  a <em>text</em> and a <em>button</em>. In order to work with popups, we need to import <em>mx.managers.PopUpManager</em> class.</p>
<p class="brush: php;">The <em>click </em>eventHandler of the button calls a method <em>PopUpManager.removePopUp(this)</em> which removes the popup.</p>
<p class="brush: php;">As we are ready with our PopUp window, we need to use this MXML component on other window to use it as a popup.</p>
<p class="brush: php;">Goto MXML Application in which we want to use the above MXML component as popup. Here's the code:</p>
<p class="brush: php;"> </p>
<pre class="brush: php;">&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300" &gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.managers.PopUpManager;
          		import myCanvas;
          		import mx.core.IFlexDisplayObject;

          		private var myPopUP:IFlexDisplayObject;

			private function showPopUp():void{
				myPopUP = PopUpManager.createPopUp(this, myCanvas, true);
			}
		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:Button id="btn1" label="ShowPopUp" click="showPopUp()"  x="56" y="50"/&gt;
&lt;/mx:Application&gt;</pre>
<p class="brush: php;">Our MXML application has only one <em>Button</em>, which calls <em>showPopUp()</em> on clicking.</p>
<p class="brush: php;">First import all the necessary packages, like <em>PopUpManager</em>, our MXML component <em>myCanvas</em>, <em>IFlexDisplayObject</em>.</p>
<p class="brush: php;">Create a new variable <em>myPopUp</em> which is of type <em>IFlexDisplayObject</em>. Inside <em>showPopUp()</em> method, we are calling function <em>createPopUp</em> with <em>this </em>(current application window, above which we intend to display the popup), <em>myCanvas</em> (the popup window)<em> </em>and modal value as <em>true</em>.</p>
<p class="brush: php;"><strong>Result:</strong></p>
<p class="brush: php;">
<object width="400" height="300">
<param name="movie" value="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/pop.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="300" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/pop.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p class="brush: php;"> As you can see, clicking the <em>showPopUp</em> button will show the pop-up.</p>
<p class="brush: php;">But once the popup is visible, the whole application will be blurred. This can be avoided by using <em>"modalTransparency=0</em>" for our <em>&lt;mx:Application&gt;</em> tag.</p>
<p class="brush: php;">The result will be:</p>
<p class="brush: php;">
<object width="400" height="300">
<param name="movie" value="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/pop1.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="300" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/pop1.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p class="brush: php;">You can see that now the whole application is not blurred.</p>
<p class="brush: php;">You can make the popUp to appear at the center of the application by using </p>
<pre class="brush: php;">PopUpManager.centerPopUp(myPopUP);</pre>
<p class="brush: php;"><span style="font-size: x-small;">function inside <em>showPopUp()</em> method after <em>createPopUp()</em>. Now the popup will always appear at the center of our application.</span></p>
<p class="brush: php;"><span style="font-size: x-small;"><strong>Result:</strong></span></p>
<p class="brush: php;"><span style="font-size: x-small;">
<object width="400" height="300">
<param name="movie" value="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/pop2.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="300" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/pop2.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</span></p>
<p class="brush: php;"><span style="font-size: x-small;">You can use whatever component as you wish to make it a popup. You can use either Panel, Title Window or even a Nice Form as a popUp.</span></p>
<p class="brush: php;"><span style="font-size: x-small;">Hope you find this useful.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/flex/creating-pop-up-windows-in-flexair/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileSystem Componets in Adobe AIR</title>
		<link>http://www.swamicharan.com/blog/air/filesystem-componets-in-adobe-air/</link>
		<comments>http://www.swamicharan.com/blog/air/filesystem-componets-in-adobe-air/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 14:08:10 +0000</pubDate>
		<dc:creator>Swami Charan</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[FileSystem]]></category>
		<category><![CDATA[FileSystemComboBox]]></category>
		<category><![CDATA[FileSystemDataGrid]]></category>
		<category><![CDATA[FileSystemList]]></category>
		<category><![CDATA[FileSystemTree]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.swamicharan.com/blog/?p=285</guid>
		<description><![CDATA[Flex File system components are the ones which combine the functionality of list controls like List, Tree, DataGrid etc with File System details. Using these File System components, we can design something like File Brower for your computer with in a matter of minutes. Here are the Flex File System components: FileSystemComboBox: Shows hierarchical directories [...]]]></description>
			<content:encoded><![CDATA[<p>Flex File system components are the ones which combine the functionality of list controls like List, Tree, DataGrid etc with File System details. Using these File System components, we can design something like File Brower for your computer with in a matter of minutes.</p>
<p>Here are the Flex File System components:</p>
<ul>
<li><strong>FileSystemComboBox</strong>: Shows hierarchical directories of selected directory</li>
<li><strong>FileSystemTree</strong>: displays contents of a directory as Tree</li>
<li><strong>FileSystemList</strong>: Shows the contents of a directory as List</li>
<li><strong>FileSystemDataGrid:</strong> Displays file information in a grid format</li>
<li><strong>FileSystemHistoryButton</strong>: Lets us move through the navigational history of another control</li>
</ul>
<p><span id="more-285"></span></p>
<p>While using these controls, we need to bind the property <em>directory</em> to any specific location like Desktop or C:\ etc.  Just provide the value for <em>directory</em> property, that will populate the control with contents of  file system like child directories , files etc. The <em>directory</em> property will act as <em>dataProvider</em> for these controls.</p>
<p>If you want to get the path of any selected file or directory in a control, you can get it through <em>FileSystemControl.directory.nativePath</em>.</p>
<p>For example,</p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;</pre>
<pre>&lt;mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"</pre>
<pre>width="800" height="600"&gt;</pre>
<pre>&lt;mx:FileSystemDataGrid x="20" y="30" width="550" height="250"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}"/&gt;</pre>
<pre> </pre>
<pre>&lt;mx:FileSystemComboBox x="20" y="300"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}" /&gt;</pre>
<pre> </pre>
<pre>&lt;mx:FileSystemTree x="600" y="20" width="200"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}"/&gt;</pre>
<pre> </pre>
<pre>&lt;mx:FileSystemList id="fsl" x="245" y="301"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}" /&gt;</pre>
<pre>&lt;/mx:WindowedApplication&gt;</pre>
<p> </p>
<p>In the above example, we are using <em>File.desktopDirectory.resolvePath('')</em> to give <strong>Desktop</strong> as the directory root for these controls. The result of this will be something like this:</p>
<p><img class="aligncenter size-full wp-image-287" title="dir1" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/dir1.jpg" alt="dir1" width="393" height="308" /></p>
<p> </p>
<p>Using just the components can make your job easy.</p>
<p> </p>
<p><strong>FileSystemHistoryButton Control</strong></p>
<p>The difference between other controls and FileSystemHistoryButton is that this is just a navigation component with no displayable List. We can assign this control any other List controls to navigate back and front of the directory structures.</p>
<p>First we need to provide <em>dataProvider </em>property with one of the controls properties. For example you can bind this <em>dataProvide </em>propery with properties like  <em>forwardHistory</em> and <em>backwardHistory</em> of FileSystemList or FileSystemDataGrid controls. Then if you set <em>click</em> and <em>itemClick</em> eventHandlers of that button to <em>navigateForward</em> and <em>navigateBack</em> method, you can navigate through the hierarchy of the directories.</p>
<p>Here's is an example:</p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;</pre>
<pre>&lt;mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"</pre>
<pre>width="800" height="500"&gt;</pre>
<pre>&lt;mx:HBox x="20" y="20"&gt;</pre>
<pre>&lt;mx:FileSystemHistoryButton label="Back" dataProvider="{fsdg.backHistory}"</pre>
<pre>enabled="{fsdg.canNavigateBack}" click="fsdg.navigateBack();"</pre>
<pre>itemClick="fsdg.navigateBack(event.index)"/&gt;</pre>
<pre>&lt;mx:FileSystemHistoryButton label="Forward" dataProvider="{fsdg.forwardHistory}"</pre>
<pre>enabled="{fsdg.canNavigateForward}" click="fsdg.navigateForward();"</pre>
<pre>itemClick="fsdg.navigateForward(event.index)"/&gt;</pre>
<pre>&lt;/mx:HBox&gt;</pre>
<pre>&lt;mx:FileSystemDataGrid id="fsdg" x="20" y="60" width="550" height="250"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}"/&gt;</pre>
<pre>&lt;/mx:WindowedApplication&gt;</pre>
<p>In the above example, the dataGrid will display file structure from Desktop. Once you double-click and directory, this navigation history is thus stored. You can use <strong>Back</strong> button to get back to <strong>Desktop</strong>.</p>
<p><strong>Result:</strong></p>
<p><img class="aligncenter size-full wp-image-288" title="historyBtns" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/historyBtns.jpg" alt="historyBtns" width="393" height="308" /></p>
<p> </p>
<p>Using FileSystemHistoryButton controls you can navigate the Directory structure in controls like FileSystemList, FileSystemDataGrid etc.</p>
<p><strong>A Simple File Browser</strong></p>
<p>Using just a FileSystemList and FileSystemDataGrid, we can make a primitive File Browser as follows:</p>
<pre>&lt;?xml version="1.0" encoding="utf-8"?&gt;</pre>
<pre>&lt;mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"&gt;</pre>
<pre>&lt;mx:HDividedBox&gt;</pre>
<pre>&lt;mx:FileSystemTree id="tree" width="300" height="100%"</pre>
<pre>enumerationMode="directoriesOnly"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}"</pre>
<pre>change="dataGrid.directory = File(tree.selectedItem)"/&gt;</pre>
<pre>&lt;mx:FileSystemDataGrid id="dataGrid" width="100%" height="100%"</pre>
<pre>directory="{File.desktopDirectory.resolvePath('')}" /&gt;</pre>
<pre>&lt;/mx:HDividedBox&gt;</pre>
<pre>&lt;/mx:WindowedApplication&gt;</pre>
<p>In this example, we have one FileSystemTree and a FileSystemDataGrid. Setting enumerationMode of FileSystemTree to directoriesOnly displays only directories in the Trees Structure. In change eventHandler we are assigning the directory property of FileSystemDataGrid the value of the Selected Tree Item. Doing this will populate the FileSystemDataGrid with the file structure of the selected Folder in the Tree.</p>
<p><strong>Result:</strong></p>
<p><img class="aligncenter size-full wp-image-290" title="browser" src="http://www.swamicharan.com/blog/wp-content/uploads/2009/09/browser.jpg" alt="browser" width="384" height="216" /></p>
<p> </p>
<p>You can use these controls and make your task done in no time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swamicharan.com/blog/air/filesystem-componets-in-adobe-air/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

