<?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>FLEX{er} &#187; Uncategorized</title>
	<atom:link href="http://www.flexer.info/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info</link>
	<description>flex developers web corner</description>
	<lastBuildDate>Tue, 04 Oct 2011 16:23:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://www.flexer.info</link>
  <url>http://www.flexer.info/favicon.ico</url>
  <title>FLEX{er}</title>
</image>
		<item>
		<title>First Full Flash Player for Mobile Devices and PCs from Adobe</title>
		<link>http://www.flexer.info/2009/10/05/first-full-flash-player-for-mobile-devices-and-pcs-from-adobe/</link>
		<comments>http://www.flexer.info/2009/10/05/first-full-flash-player-for-mobile-devices-and-pcs-from-adobe/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 08:28:48 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[open screen project]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=1209</guid>
		<description><![CDATA[Today, Adobe unveiled Adobe® Flash® Player 10.1 software for smartphones, smartbooks, netbooks, PCs and other Internet-connected devices, allowing content created using the Adobe Flash Platform to reach users wherever they are.
A public beta of the browser-based runtime is expected to be available for Windows Mobile, Palm webOS and desktop operating systems including Windows, Macintosh and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F10%2F05%2Ffirst-full-flash-player-for-mobile-devices-and-pcs-from-adobe%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F10%2F05%2Ffirst-full-flash-player-for-mobile-devices-and-pcs-from-adobe%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/10/05/first-full-flash-player-for-mobile-devices-and-pcs-from-adobe/&title=First+Full+Flash+Player+for+Mobile+Devices+and+PCs+from+Adobe&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>Today, Adobe unveiled Adobe® Flash® Player 10.1 software for smartphones, smartbooks, netbooks, PCs and other Internet-connected devices, allowing content created using the Adobe Flash Platform to reach users wherever they are.</p>
<p>A public beta of the browser-based runtime is expected to be available for Windows Mobile, Palm webOS and desktop operating systems including Windows, Macintosh and Linux later this year. Public betas for Google Android and Symbian OS are expected to be available in early 2010. In addition, Adobe and RIM announced a joint collaboration to bring Flash Player to Blackberry smartphones, and Google joined close to 50 other industry players in the Open Screen Project initiative.</p>
<p>The browser-based runtime leverages the power of the Graphics Processing Unit (GPU) for accelerated video and graphics while conserving battery life and minimizing resource utilization.</p>
<p>Led by Adobe, the Open Screen Project includes close to 50 industry leaders working together to provide a consistent runtime environment across mobile phones, desktops and other consumer electronic devices. The initiative addresses the challenges of Web browsing and standalone applications on a broad range of devices, and removes the barriers to publishing content and applications seamlessly across screens.</p>
<p>Read more&#8230;<br />
<a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200910/100509AFPforMobileDevicesandPCs.html" target="_blank">http://www.adobe.com/aboutadobe/pressroom/pressreleases/200910/100509AFPforMobileDevicesandPCs.html</a><br />
<a href="http://www.openscreenproject.org/" target="_blank">http://www.openscreenproject.org/</a><br />
<a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200910/100509RIMjoinsOSP.html" target="_blank">http://www.adobe.com/aboutadobe/pressroom/pressreleases/200910/100509RIMjoinsOSP.html</a><br />
<a href="http://googleblog.blogspot.com/2009/10/teaming-up-with-adobe-and-open-screen.html" target="_blank">http://googleblog.blogspot.com/2009/10/teaming-up-with-adobe-and-open-screen.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/10/05/first-full-flash-player-for-mobile-devices-and-pcs-from-adobe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Flex Camp Taking Place in Iasi, 31st October</title>
		<link>http://www.flexer.info/2009/09/29/new-flex-camp-taking-place-in-iasi-31st-october/</link>
		<comments>http://www.flexer.info/2009/09/29/new-flex-camp-taking-place-in-iasi-31st-october/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 15:00:20 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Conferences, Meetings & Events]]></category>
		<category><![CDATA[Flex news]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flex camp]]></category>
		<category><![CDATA[iasi]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=1190</guid>
		<description><![CDATA[A new Flex Camp is going to take place in Iasi on 31st October. This is in the north-eastern part of Romania. It will be an interesting conference because I&#8217;m sure the Adobe Evangelists will come with lots of new stuff from MAX.
Magda from Adobe Romania has already posted a call for papers. If you [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F09%2F29%2Fnew-flex-camp-taking-place-in-iasi-31st-october%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F09%2F29%2Fnew-flex-camp-taking-place-in-iasi-31st-october%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/09/29/new-flex-camp-taking-place-in-iasi-31st-october/&title=New+Flex+Camp+Taking+Place+in+Iasi,+31st+October&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>A new Flex Camp is going to take place in Iasi on 31st October. This is in the north-eastern part of Romania. It will be an interesting conference because I&#8217;m sure the Adobe Evangelists will come with lots of new stuff from <a href="http://max.adobe.com/" target="_blank">MAX</a>.</p>
<p>Magda from Adobe Romania has already posted a call for papers. If you want to be a speaker just go ahead and send your topic to Adobe (romania-at-adobe.com). For more details see <a href="http://myadobe.ro/2009/09/14/flex-camp-iasi-call-for-papers/" target="_blank">Magda’s post on myadobe.ro</a> (it is in Romanian).</p>
<p>Registration can be done on <a href="http://flexcampiasi.eventbrite.com/" target="_blank">http://flexcampiasi.eventbrite.com/</a> or on <a href="http://myadobe.ro/2009/09/24/am-deschis-inscrierile-pentru-flex-camp-iasi/" target="_blank">http://myadobe.ro/2009/09/24/am-deschis-inscrierile-pentru-flex-camp-iasi/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/09/29/new-flex-camp-taking-place-in-iasi-31st-october/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Player 10 (codename ASTRO) prerelease ready for download</title>
		<link>http://www.flexer.info/2008/05/16/flash-player-10-codename-astro-prerelease-ready-for-download/</link>
		<comments>http://www.flexer.info/2008/05/16/flash-player-10-codename-astro-prerelease-ready-for-download/#comments</comments>
		<pubDate>Fri, 16 May 2008 10:36:50 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[Flex news]]></category>
		<category><![CDATA[Flex resources]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=173</guid>
		<description><![CDATA[Adobe Flash Player 10 (codename &#8220;Astro&#8221;) can be downloaded from Adobe site following this link: http://labs.adobe.com/technologies/flashplayer10/
New features:

Hardware acceleration &#8211; flash player will use the GPU for some visual processing tasks
Advanced Text Layout &#8211; a new engine for text layout (as you may know the old TextField has big problems when rendering text, htmlText and images) [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2008%2F05%2F16%2Fflash-player-10-codename-astro-prerelease-ready-for-download%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2008%2F05%2F16%2Fflash-player-10-codename-astro-prerelease-ready-for-download%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2008/05/16/flash-player-10-codename-astro-prerelease-ready-for-download/&title=Flash+Player+10+(codename+ASTRO)+prerelease+ready+for+download&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>Adobe Flash Player 10 (codename &#8220;Astro&#8221;) can be downloaded from Adobe site following this link: <a href="http://labs.adobe.com/technologies/flashplayer10/" target="_blank">http://labs.adobe.com/technologies/flashplayer10/</a></p>
<p>New features:</p>
<ol>
<li>Hardware acceleration &#8211; flash player will use the GPU for some visual processing tasks</li>
<li>Advanced Text Layout &#8211; a new engine for text layout (as you may know the old TextField has big problems when rendering text, htmlText and images) &#8211; we hope that the <a href="http://www.flexer.info/2008/05/08/html-tags-and-attributes-supported-by-flash-player/">allowed HTML tags</a> will be extended)  </li>
<li>3D Effects &#8211; native 3D effects to any display object</li>
<li>Custom Filters and Effects &#8211; filters and effects like the ones in After Effects CS3 will be possible using <a href="http://www.adobe.com/go/pixelbender_toolkit" target="_blank">Adobe Pixel Bender</a></li>
<li>Enhanced Drawing API &#8211; easier runtime drawing</li>
</ol>
<p>What developers should know that I couldn&#8217;t find the Debug Version of Astro. So if you are developing application you should keep in mind that after updating to Astro there will be no debug.</p>
<p>But a good news is that there you can download <a href="http://opensource.adobe.com/wiki/display/flexsdk/Targeting+Flash+Player+10+Beta+with+Flex+SDK+3.0.x" target="_blank">Flex SDK Daily updates</a> to be able to develop applications for Astro.</p>
<p>There is also a <a href="http://labs.adobe.com/technologies/flashplayer10/demos/" target="_blank">demo and some videos</a> to see the new features of Astro in action.</p>
<p>From what we can see the new flash player (codename &#8220;Astro&#8221;) will be a big turn for the internet and mostly for RIA and Web 2.0 industry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/05/16/flash-player-10-codename-astro-prerelease-ready-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR applications File and Directory</title>
		<link>http://www.flexer.info/2008/05/08/air-applications-file-and-directory/</link>
		<comments>http://www.flexer.info/2008/05/08/air-applications-file-and-directory/#comments</comments>
		<pubDate>Thu, 08 May 2008 07:12:39 +0000</pubDate>
		<dc:creator>Virgil Cristea</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=164</guid>
		<description><![CDATA[In the past days I had to write a small app in AIR and one of the problems I came across was the saving of preferences locally. I needed to be able to read/write a file on the local file system. After some digging I found the answer and decided to make a small tutorial [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2008%2F05%2F08%2Fair-applications-file-and-directory%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2008%2F05%2F08%2Fair-applications-file-and-directory%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2008/05/08/air-applications-file-and-directory/&title=AIR+applications+File+and+Directory&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>In the past days I had to write a small app in AIR and one of the problems I came across was the saving of preferences locally. I needed to be able to read/write a file on the local file system. After some digging I found the answer and decided to make a small tutorial on how AIR works with files/directories.</p>
<p>So this is the first part of a series of articles on how to use the filesystem from an AIR application. The last article in the series will also include some workin examples. (Parts of the information presented here is obtained from the ADOBE library).</p>
<h3>Directories info</h3>
<p><b>File.userDirectory</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">User&#8217;s home directory.</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white">The home directory is the parent of the &#8220;My Documents&#8221; directory (for example, &#8220;C:\Documents and Settings\userName\My Documents&#8221;).</td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white">The home directory is the Users/userName directory.</td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white"></td>
</tr>
</table>
<p><b>File.documentsDirectory</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">User&#8217;s documents directory.</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white">This is typically the &#8220;My Documents&#8221; directory (for example, &#8220;C:\Documents and Settings\userName\My Documents&#8221;).</td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white">It is the Users/userName/Documents directory.</td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white"></td>
</tr>
</table>
<p><b>File.desktopDirectory</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">User&#8217;s desktop</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white"></td>
</tr>
</table>
<p><b>File.applicationStorageDirectory</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">Application storage directory. For every AIR application, there is a unique associated path that defines the application storage directory. This directory is unique to each application and user.</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white">In the documents and Settings directory, in user name/Application Data/applicationID.publisherID/Local Store/ (C:\Documents and Settings\babbage\Application Data\com.example.TestApp. 02D88EEED35F84C264A183921344EEA353A629FD.1\ Local Store)</td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white">In /Users/user name/Library/Preferences/applicationID.publisherID/Local Store/ (/Users/babbage/Library/Preferences/ com.example.TestApp.02D88EEED35F84C264A183921344EEA353A629FD.1 /Local Store)</td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white">The URL (and url property) for a File object created with File.applicationStorageDirectory uses the app-storage URL scheme.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> dir = File.<span style="color: #006600;">applicationStorageDirectory</span>;
dir = dir.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;prefs.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>dir.<span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// app-storage:/preferences</span></pre></div></div>

</td>
</tr>
</table>
<p><b>File.applicationDirectory</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">The directory in which the application was installed, known as the application directory. </td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white">The URL (and url property) for a File object created with File.applicationDirectory uses the app URL scheme.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> dir = File.<span style="color: #006600;">applicationDirectory</span>;
dir = dir.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;prefs.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>dir.<span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// app:/preferences</span></pre></div></div>

</td>
</tr>
</table>
<p><b>File.getRootDirectories()</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">Lists all root volumes</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white">All volumes such as C: and mounted volumes</td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white">Always returns the unique root directory for the machine (the &#8220;/&#8221; directory)</td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white"></td>
</tr>
</table>
<p><b>File()</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">Used to point to an explicit directory</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white">

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> file = <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
file.<span style="color: #006600;">nativePath</span> = <span style="color: #ff0000;">&quot;C:<span style="color: #000099; font-weight: bold;">\\</span>AIR Test<span style="color: #000099; font-weight: bold;">\\</span>&quot;</span>;</pre></div></div>

<p>            or by using the url property</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> urlStr = <span style="color: #ff0000;">&quot;file:///C:/AIR Test/&quot;</span>;
<span style="color: #000000; font-weight: bold;">var</span> file = <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
file.<span style="color: #0066CC;">url</span> = urlStr;</pre></div></div>

</td>
</tr>
</table>
<p><b>currentDirectory</b></p>
<table bgcolor="#6699cc"  cellspacing="1" cellpadding="4" border="0">
<tr>
<td  bgcolor="white"><b>Description</b></td>
<td  bgcolor="white">The directory location from which an application is invoked can be found out by checking the currentDirectory property of the InvokeEvent object dispatched when the application is invoked.</td>
</tr>
<tr>
<td  bgcolor="white"><b>Windows</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Mac OS</b></td>
<td  bgcolor="white"></td>
</tr>
<tr>
<td  bgcolor="white"><b>Notes</b></td>
<td  bgcolor="white">
        </td>
</tr>
</table>
<h3>Working with directories</h3>
<p><b>Creating directories</b></p>
<p>The File.createDirectory() method lets you create a directory. For example, the following code creates a directory named AIR Test as a subdirectory of the user&#8217;s home directory:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> dir = File.<span style="color: #006600;">userDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;AIR Test&quot;</span><span style="color: #66cc66;">&#41;</span>;
dir.<span style="color: #006600;">createDirectory</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>If the directory exists, the createDirectory() method does nothing.</p>
<p>Also, in some modes, a FileStream object creates directories when opening files. Missing directories are created when you instantiate a FileStream instance with the fileMode parameter of the FileStream() constructor set to FileMode.APPEND or FileMode.WRITE.</p>
<p><b>Creating a temporary directory</b></p>
<p>The File class includes a createTempDirectory() method, which creates a directory in the temporary directory folder for the System, as in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> temp = File.<span style="color: #006600;">createTempDirectory</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The createTempDirectory() method automatically creates a unique temporary directory (saving you the work of determining a new unique location).</p>
<p>You may use a temporary directory to temporarily store temporary files used for a session of the application. Note that there is a createTempFile() method for creating new, unique temporary files in the System temporary directory.</p>
<p>You may want to delete the temporary directory before closing the application, as it is not automatically deleted.</p>
<p><b>Enumerating directories</b></p>
<p>You can use the getDirectoryListing() method or the getDirectoryListingAsync() method of a File object to get an array of File objects pointing to files and subfolders in a directory.</p>
<p>For example, the following code lists the contents of the user&#8217;s documents directory (without examining subdirectories):</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> directory = air.<span style="color: #006600;">File</span>.<span style="color: #006600;">documentsDirectory</span>;
<span style="color: #000000; font-weight: bold;">var</span> contents = directory.<span style="color: #006600;">getDirectoryListing</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> contents.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
    alert<span style="color: #66cc66;">&#40;</span>contents<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>, contents<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">size</span><span style="color: #66cc66;">&#41;</span>; 
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>When using the asynchronous version of the method, the directoryListing event object has a files property that is the array of File objects pertaining to the directories:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> directory = air.<span style="color: #006600;">File</span>.<span style="color: #006600;">documentsDirectory</span>;
directory.<span style="color: #006600;">getDirectoryListingAsync</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
directory.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>air.<span style="color: #006600;">FileListEvent</span>.<span style="color: #006600;">DIRECTORY_LISTING</span>, dirListHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> dirListHandler<span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> contents = event.<span style="color: #006600;">files</span>;
    <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>i = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> contents.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> 
    <span style="color: #66cc66;">&#123;</span>
        alert<span style="color: #66cc66;">&#40;</span>contents<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>, contents<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">size</span><span style="color: #66cc66;">&#41;</span>; 
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><b>Copying and moving directories</b></p>
<p>You can copy or move a directory, using the same methods as you would to copy or move a file. For example, the following code copies a directory synchronously:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> sourceDir = air.<span style="color: #006600;">File</span>.<span style="color: #006600;">documentsDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;AIR Test&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> resultDir = air.<span style="color: #006600;">File</span>.<span style="color: #006600;">documentsDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;AIR Test Copy&quot;</span><span style="color: #66cc66;">&#41;</span>;
sourceDir.<span style="color: #006600;">copyTo</span><span style="color: #66cc66;">&#40;</span>resultDir<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>When you specify true for the overwrite parameter of the copyTo() method, all files and folders in an existing target directory are deleted and replaced with the files and folders in the source directory (even if the target file does not exist in the source directory).</p>
<p>The directory that you specify as the newLocation parameter of the copyTo() method specifies the path to the resulting directory; it does not specify the parent directory that will contain the resulting directory.</p>
<p><b>Deleting directory contents</b></p>
<p>The File class includes a deleteDirectory() method and a deleteDirectoryAsync() method. These methods delete directories, the first working synchronously, the second working asynchronously (see AIR file basics). Both methods include a deleteDirectoryContents parameter (which takes a Boolean value); when this parameter is set to true (the default value is false) the call to the method deletes non-empty directories; otherwise, only empty directories are deleted.</p>
<p>For example, the following code synchronously deletes the AIR Test subdirectory of the user&#8217;s documents directory:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> directory = air.<span style="color: #006600;">File</span>.<span style="color: #006600;">documentsDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;AIR Test&quot;</span><span style="color: #66cc66;">&#41;</span>;
directory.<span style="color: #006600;">deleteDirectory</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>The following code asynchronously deletes the AIR Test subdirectory of the user&#8217;s documents directory:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> directory = air.<span style="color: #006600;">File</span>.<span style="color: #006600;">documentsDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;AIR Test&quot;</span><span style="color: #66cc66;">&#41;</span>;
directory.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>air.<span style="color: #006600;">Event</span>.<span style="color: #006600;">COMPLETE</span>, completeHandler<span style="color: #66cc66;">&#41;</span>
directory.<span style="color: #006600;">deleteDirectoryAsync</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> completeHandler<span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    alert<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Deleted.&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Also included are the moveToTrash() and moveToTrashAsync() methods, which you can use to move a directory to the System trash.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2008/05/08/air-applications-file-and-directory/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

