<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for EverythingFlex: Flex &amp; AIR</title>
	
	<link>http://blog.everythingflex.com</link>
	<description>News and Information about Adobe Flex &amp; Adobe AIR by Rich Tretola</description>
	<lastBuildDate>Wed, 22 Feb 2012 15:34:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CommentsForEverythingflex" /><feedburner:info uri="commentsforeverythingflex" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Creating a mobile mp3 player by YoungSoul</title>
		<link>http://feedproxy.google.com/~r/CommentsForEverythingflex/~3/JjtUXex-ZBE/</link>
		<dc:creator>YoungSoul</dc:creator>
		<pubDate>Wed, 22 Feb 2012 15:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.everythingflex.com/?p=2610#comment-161435</guid>
		<description>BTW - I used this technique in a Flex iOS app that I have in the app store now.  If you search for betterwithbacon that app pulls mp3 files from a server, saves them in the local ios cache directory and then plays the mp3 file from the devices filesystem.  I know this works - but it is not straight forward.

Look at my other reply in this blog about saving data locally if your platform is iOS.  Getting the file in the right directory was a little tricky.</description>
		<content:encoded><![CDATA[<p>BTW &#8211; I used this technique in a Flex iOS app that I have in the app store now.  If you search for betterwithbacon that app pulls mp3 files from a server, saves them in the local ios cache directory and then plays the mp3 file from the devices filesystem.  I know this works &#8211; but it is not straight forward.</p>
<p>Look at my other reply in this blog about saving data locally if your platform is iOS.  Getting the file in the right directory was a little tricky.</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.everythingflex.com/2011/07/06/creating-a-mobile-mp3-player/comment-page-1/#comment-161435</feedburner:origLink></item>
	<item>
		<title>Comment on Creating a mobile mp3 player by YoungSoul</title>
		<link>http://feedproxy.google.com/~r/CommentsForEverythingflex/~3/kXlX9aMONoA/</link>
		<dc:creator>YoungSoul</dc:creator>
		<pubDate>Wed, 22 Feb 2012 15:27:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.everythingflex.com/?p=2610#comment-161433</guid>
		<description>I did something like the following.  I realize it is snippets of code and I can try to provide more offline if you like.

The FileUtils.getFileUrl is only needed because I need to pull my mp3 file from the ios cache directory.  Not sure about the difference with Android just yet.  Assuming you can get a valid File reference though.

protected function loadSampleFromFile():void {
			var fileUrl:String = FileUtils.getFileUrl(fileName);
			if(_originalSample == null &amp;&amp; fileUrl != null &amp;&amp; fileUrl.length &gt; 0 ) {
				_originalSample = new SoundAsset();
				_originalSample.addEventListener(Event.COMPLETE, loadFromFileComplete);
				
				_originalSample.load(new URLRequest(fileUrl));
			}
			
		}
		
in the complete handler, after all of the error checking I did something like the following: where pos starts out as 0 which means from the beginning.

		// 1/2 volume from beginning
		var transform:SoundTransform = new SoundTransform(0.5, 0);	
		var _channelOriginalMP3:SoundChannel = _originalSample.play(pos, 1, transform);

Hope that helps</description>
		<content:encoded><![CDATA[<p>I did something like the following.  I realize it is snippets of code and I can try to provide more offline if you like.</p>
<p>The FileUtils.getFileUrl is only needed because I need to pull my mp3 file from the ios cache directory.  Not sure about the difference with Android just yet.  Assuming you can get a valid File reference though.</p>
<p>protected function loadSampleFromFile():void {<br />
			var fileUrl:String = FileUtils.getFileUrl(fileName);<br />
			if(_originalSample == null &amp;&amp; fileUrl != null &amp;&amp; fileUrl.length &gt; 0 ) {<br />
				_originalSample = new SoundAsset();<br />
				_originalSample.addEventListener(Event.COMPLETE, loadFromFileComplete);</p>
<p>				_originalSample.load(new URLRequest(fileUrl));<br />
			}</p>
<p>		}</p>
<p>in the complete handler, after all of the error checking I did something like the following: where pos starts out as 0 which means from the beginning.</p>
<p>		// 1/2 volume from beginning<br />
		var transform:SoundTransform = new SoundTransform(0.5, 0);<br />
		var _channelOriginalMP3:SoundChannel = _originalSample.play(pos, 1, transform);</p>
<p>Hope that helps</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.everythingflex.com/2011/07/06/creating-a-mobile-mp3-player/comment-page-1/#comment-161433</feedburner:origLink></item>
	<item>
		<title>Comment on ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. by Soumya Vinod</title>
		<link>http://feedproxy.google.com/~r/CommentsForEverythingflex/~3/Q0FywzrCWDc/</link>
		<dc:creator>Soumya Vinod</dc:creator>
		<pubDate>Tue, 21 Feb 2012 17:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.everythingflex.com/?p=766#comment-161213</guid>
		<description>ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
There should be only one main application. All the other mxml files should use a container like vbox,canvas etc</description>
		<content:encoded><![CDATA[<p>ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.<br />
There should be only one main application. All the other mxml files should use a container like vbox,canvas etc</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.everythingflex.com/2008/12/13/argumenterror-error-2025-the-supplied-displayobject-must-be-a-child-of-the-caller/comment-page-1/#comment-161213</feedburner:origLink></item>
	<item>
		<title>Comment on Creating a mobile mp3 player by Mark</title>
		<link>http://feedproxy.google.com/~r/CommentsForEverythingflex/~3/qgFUeOW6mEc/</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 20 Feb 2012 08:25:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.everythingflex.com/?p=2610#comment-160881</guid>
		<description>I know that this is rather old... However, I am pulling my hair out over this.  No matter what I attempt, I can not get the result I am looking for...  All I want to do is play an mp3 based on which button is hit...  It is driving me bonkers. Everything I attempt results in error.  I attempted URLRequest with the external files, I have attempted embeded...  Can someone point me in the right direction?</description>
		<content:encoded><![CDATA[<p>I know that this is rather old&#8230; However, I am pulling my hair out over this.  No matter what I attempt, I can not get the result I am looking for&#8230;  All I want to do is play an mp3 based on which button is hit&#8230;  It is driving me bonkers. Everything I attempt results in error.  I attempted URLRequest with the external files, I have attempted embeded&#8230;  Can someone point me in the right direction?</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.everythingflex.com/2011/07/06/creating-a-mobile-mp3-player/comment-page-1/#comment-160881</feedburner:origLink></item>
	<item>
		<title>Comment on AIR on Android: CameraUI by carrybagman</title>
		<link>http://feedproxy.google.com/~r/CommentsForEverythingflex/~3/PzgZ_YRGS78/</link>
		<dc:creator>carrybagman</dc:creator>
		<pubDate>Tue, 14 Feb 2012 15:20:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.everythingflex.com/?p=2112#comment-159677</guid>
		<description>I also have Fidel's problem of CameraUI storing 2 identical photos on the phone, which for me is a Samsung Galaxy S2.  Looking at the file creation times I think the first one is created when you take the picture and then the second one (which is the one returned on the MediaEvent.COMPLETE event) when you press the button to accept it.  Don't really want the SD card filling up twice as fast as it should.  Anyone know how to stop this happening please?</description>
		<content:encoded><![CDATA[<p>I also have Fidel&#8217;s problem of CameraUI storing 2 identical photos on the phone, which for me is a Samsung Galaxy S2.  Looking at the file creation times I think the first one is created when you take the picture and then the second one (which is the one returned on the MediaEvent.COMPLETE event) when you press the button to accept it.  Don&#8217;t really want the SD card filling up twice as fast as it should.  Anyone know how to stop this happening please?</p>
]]></content:encoded>
	<feedburner:origLink>http://blog.everythingflex.com/2010/09/20/air-on-android-cameraui/comment-page-1/#comment-159677</feedburner:origLink></item>
</channel>
</rss>
