<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Loading in local external assets into an Air app</title>
	<atom:link href="http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app</link>
	<description>The reward of a thing well done...</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:05:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Robert Eaglestone</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2403</link>
		<dc:creator>Robert Eaglestone</dc:creator>
		<pubDate>Thu, 19 Jan 2012 16:00:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2403</guid>
		<description>&lt;p&gt;Looks like you could also specify a path relative to the AIR executable by prefixing &quot;app:&quot; to the URL.  Reference:&lt;/p&gt;

&lt;p&gt;http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7db4&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Looks like you could also specify a path relative to the AIR executable by prefixing &#8220;app:&#8221; to the URL.  Reference:</p>

<p><a href="http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7db4" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html_WS5b3ccc516d4fbf351e63e3d118666ade46-7db4?referer=');">http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7fe4.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7db4</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: jl</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2398</link>
		<dc:creator>jl</dc:creator>
		<pubDate>Mon, 09 Jan 2012 22:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2398</guid>
		<description>&lt;p&gt;Figured it out:&lt;/p&gt;

&lt;p&gt;function testPlay (event:MouseEvent):void
{
var file:File = File.documentsDirectory.resolvePath(&quot;myVoice.mp3&quot;); 
 var trade:URLRequest = new URLRequest(file.url)
var snd:Sound = new Sound(trade);
snd.play();
}&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Figured it out:</p>

<p>function testPlay (event:MouseEvent):void
{
var file:File = File.documentsDirectory.resolvePath(&#8220;myVoice.mp3&#8243;); 
 var trade:URLRequest = new URLRequest(file.url)
var snd:Sound = new Sound(trade);
snd.play();
}</p>]]></content:encoded>
	</item>
	<item>
		<title>By: jl</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2397</link>
		<dc:creator>jl</dc:creator>
		<pubDate>Mon, 09 Jan 2012 22:26:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2397</guid>
		<description>&lt;p&gt;I&#039;ve saved a .mp3 into:&lt;/p&gt;

&lt;p&gt;var myfilename:File = File.documentsDirectory;
myfilename = myfilename.resolvePath(&quot;myVoice.mp3&quot;);&lt;/p&gt;

&lt;p&gt;I keep getting stream errors when trying to reference the file and play the .mp3 as a new Sound.&lt;/p&gt;

&lt;p&gt;Any suggestions?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve saved a .mp3 into:</p>

<p>var myfilename:File = File.documentsDirectory;
myfilename = myfilename.resolvePath(&#8220;myVoice.mp3&#8243;);</p>

<p>I keep getting stream errors when trying to reference the file and play the .mp3 as a new Sound.</p>

<p>Any suggestions?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2333</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Wed, 30 Nov 2011 01:08:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2333</guid>
		<description>&lt;p&gt;Corey,&lt;/p&gt;

&lt;p&gt;I actually haven’t done anything with Air. I thought I was going to almost two years ago, and came across this problem and solution. But, as it turned it, the Flash project never needed to be turned into an Air app. So this blog post just about sums up everything I know about Air :)&lt;/p&gt;

&lt;p&gt;Erik&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Corey,</p>

<p>I actually haven’t done anything with Air. I thought I was going to almost two years ago, and came across this problem and solution. But, as it turned it, the Flash project never needed to be turned into an Air app. So this blog post just about sums up everything I know about Air :)</p>

<p>Erik</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Corey B</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2332</link>
		<dc:creator>Corey B</dc:creator>
		<pubDate>Tue, 29 Nov 2011 23:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2332</guid>
		<description>&lt;p&gt;Erik, thanks for posting the code snippets. Did you have a hard time learning Adobe Air when you first sat down to take a crack at it?&lt;/p&gt;

&lt;p&gt;~ Corey B&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Erik, thanks for posting the code snippets. Did you have a hard time learning Adobe Air when you first sat down to take a crack at it?</p>

<p>~ Corey B</p>]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2234</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Thu, 03 Nov 2011 17:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2234</guid>
		<description>&lt;p&gt;Help!&lt;/p&gt;

&lt;p&gt;My URLLoader/URLRequest methods work  fine when in AIR Launcher mode - but when I try on my device it fails... giving me this message over the remote debug session:&lt;/p&gt;

&lt;p&gt;&quot;...text=Error #2032: Stream Error. URL: app:/assets/xml/projects.xml&quot;&lt;/p&gt;

&lt;p&gt;I&#039;ve even tried changing my code to use the File.applicationDirectory approach .... and while that works in the AIR Launcher my device still fails to load it!  What am I missing? Anyone have a clue?  Thanks in advance for anyone who can help or hint!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Help!</p>

<p>My URLLoader/URLRequest methods work  fine when in AIR Launcher mode &#8211; but when I try on my device it fails&#8230; giving me this message over the remote debug session:</p>

<p>&#8220;&#8230;text=Error #2032: Stream Error. URL: app:/assets/xml/projects.xml&#8221;</p>

<p>I&#8217;ve even tried changing my code to use the File.applicationDirectory approach &#8230;. and while that works in the AIR Launcher my device still fails to load it!  What am I missing? Anyone have a clue?  Thanks in advance for anyone who can help or hint!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: alek</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-2033</link>
		<dc:creator>alek</dc:creator>
		<pubDate>Sun, 28 Aug 2011 15:10:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-2033</guid>
		<description>&lt;p&gt;Thanks for this post - this article was very useful. Have you figured out how to load a local SWF? While it seems straight forward, I&#039;ve been trying to use the various methods on Google to no avail. Wondering if you had a solution.&lt;/p&gt;

&lt;p&gt;I think I got it to load using a regular Loader object, but when I do addChild(myLoader) nothing gets added to the stage. Very odd.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for this post &#8211; this article was very useful. Have you figured out how to load a local SWF? While it seems straight forward, I&#8217;ve been trying to use the various methods on Google to no avail. Wondering if you had a solution.</p>

<p>I think I got it to load using a regular Loader object, but when I do addChild(myLoader) nothing gets added to the stage. Very odd.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: TheDarkIn1978</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-1054</link>
		<dc:creator>TheDarkIn1978</dc:creator>
		<pubDate>Mon, 04 Oct 2010 05:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-1054</guid>
		<description>&lt;p&gt;if your XML and image assets are permanent, it will be easier for you to bundle your assets with your AIR application and call them from File.applicationDirectory rather than having to make sure they are in the operating system&#039;s document folder.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>if your XML and image assets are permanent, it will be easier for you to bundle your assets with your AIR application and call them from File.applicationDirectory rather than having to make sure they are in the operating system&#8217;s document folder.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: shammi</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-709</link>
		<dc:creator>shammi</dc:creator>
		<pubDate>Tue, 20 Jul 2010 15:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-709</guid>
		<description>&lt;p&gt;Hi. nice for u to share. can i use this for swf files.&lt;/p&gt;

&lt;p&gt;var file:File = File.documentsDirectory.resolvePath(&quot;air_app_assets/newfile.swf&quot;);
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.READ);
 var swfloader: Loader= new Loader 
swfloader. LoadBytes(fileStream.readUTFBytes(fileStream.bytesAvailable)); 
fileStream.close();
u think it will load. and if this parent swf futher loads child files or iamges files from that same directory(assets directory) will it work&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi. nice for u to share. can i use this for swf files.</p>

<p>var file:File = File.documentsDirectory.resolvePath(&#8220;air_app_assets/newfile.swf&#8221;);
var fileStream:FileStream = new FileStream();
fileStream.open(file, FileMode.READ);
 var swfloader: Loader= new Loader 
swfloader. LoadBytes(fileStream.readUTFBytes(fileStream.bytesAvailable)); 
fileStream.close();
u think it will load. and if this parent swf futher loads child files or iamges files from that same directory(assets directory) will it work</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Erik P. Hansen</title>
		<link>http://blog.erikphansen.com/loading-in-local-external-assets-into-an-air-app/comment-page-1#comment-431</link>
		<dc:creator>Erik P. Hansen</dc:creator>
		<pubDate>Thu, 14 Jan 2010 20:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.erikphansen.com/loading-in-local-external-images-into-an-air-app#comment-431</guid>
		<description>&lt;p&gt;Yeah, I had a hard time finding a clear explanation so I thought it was worth sharing what I learned. Hopefully it helped you out.&lt;/p&gt;

&lt;p&gt;Erik&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yeah, I had a hard time finding a clear explanation so I thought it was worth sharing what I learned. Hopefully it helped you out.</p>

<p>Erik</p>]]></content:encoded>
	</item>
</channel>
</rss>

