<?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>Robots w/Lasers &#187; Apollo</title>
	<atom:link href="http://blog.davr.org/category/flash/apollo/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.davr.org</link>
	<description>Nintendo DS &#038; GBA development, microcontrollers, and occasionally FPGAs</description>
	<lastBuildDate>Thu, 08 Jul 2010 17:22:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Apollo Intrinsic Classes</title>
		<link>http://blog.davr.org/2007/04/20/apollo-intrinsic-classes/</link>
		<comments>http://blog.davr.org/2007/04/20/apollo-intrinsic-classes/#comments</comments>
		<pubDate>Fri, 20 Apr 2007 16:01:19 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[Apollo]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2007/04/20/apollo-intrinsic-classes/</guid>
		<description><![CDATA[UPDATE: Complete &#38; accurate versions can be found by brainy at flashdevelop forums, much better than my unfinished attempt. I have written a quick &#038; hacky script to parse the]]></description>
			<content:encoded><![CDATA[<p>UPDATE: Complete &amp; accurate versions can be found by <a href="http://www.flashdevelop.org/community/viewtopic.php?t=1400">brainy at flashdevelop forums</a>, much better than my unfinished attempt.</p>
<p>I have written a quick &#038; hacky script to parse the <a href="http://labs.adobe.com/wiki/index.php/Apollo:Documentation:API_Reference"apollo reference</a> to create intrinsic classes. It is not perfect, and they still need a bit of cleanup by hand (imports, a few syntax errors here and there). But I&#8217;ve gotten a good 90% of the hard work done.</p>
<p>These would be useful for anyone using a IDE besides Flex Builder, in order to get autocomplete etc.</p>
<p>Please, if you do clean them up, post a comment, and I will link it here, so everyone can use them.</p>
<p>Download: <a href="http://davr.org/flash/ApolloIntrinsic_draft.zip">ApolloIntrinsic_draft.zip</a></p>
<p><b>UPDATE: </b> I tried again, this time by parsing the bytecodes from the SWC. There&#8217;s only one problem, no paramater names (but I do have paramamter types). The cool part about this way, is that it shows all the undocumented and private methods as well!</p>
<p><b>UPDATE AGAIN: </b> was missing some classes due to not parsing dynamic or final classes.</p>
<p>Download: <a href="http://davr.org/flash/ApolloIntrinsic_draft3.zip">ApolloIntrinsic_draft3.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2007/04/20/apollo-intrinsic-classes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apollo App: AS3 Tip of the Day</title>
		<link>http://blog.davr.org/2007/04/05/apollo-app-as3-tip-of-the-day/</link>
		<comments>http://blog.davr.org/2007/04/05/apollo-app-as3-tip-of-the-day/#comments</comments>
		<pubDate>Fri, 06 Apr 2007 05:27:52 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[Apollo]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2007/04/03/apollo-app-as3-tip-of-the-day/</guid>
		<description><![CDATA[This is another fairly quick app I wrote, it pulls the posts from senocular&#8217;s AS3 Tip of the Day thread, and then displays them in a little browser (minus all the other forum cruft). It also caches them to disk, so each tip needs to be loaded only once. (sorry for the lame interface) AS3Tips.air [...]]]></description>
			<content:encoded><![CDATA[<p>This is another fairly quick app I wrote, it pulls the posts from senocular&#8217;s <a href="http://kirupa.com/forum/showthread.php?t=223798">AS3 Tip of the Day</a> thread, and then displays them in a little browser (minus all the other forum cruft). It also caches them to disk, so each tip needs to be loaded only once.</p>
<p><img src="http://davr.org/pics/as3tips.png" width="570" height="477" /></p>
<p>(sorry for the lame interface)</p>
<p><a href="http://davr.org/flash/AS3Tips.air">AS3Tips.air</a> &#8212; install file, requires <a href="http://labs.adobe.com/downloads/apolloruntime.html">Apollo Alpha Runtime</a>.<br />
<a href="http://davr.org/flash/AS3Tips.mxml">AS3Tips.mxml</a> &#8212; source code</p>
<p>Thanks to <a href="http://www.senocular.com/?id=1.388">senocular</a> for writing these amazingly helpful AS3 tips!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2007/04/05/apollo-app-as3-tip-of-the-day/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Native file browse dialog in Apollo</title>
		<link>http://blog.davr.org/2007/03/28/native-file-browse-dialog-in-apollo/</link>
		<comments>http://blog.davr.org/2007/03/28/native-file-browse-dialog-in-apollo/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 04:26:14 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[Apollo]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2007/03/28/native-file-browse-dialog-in-apollo/</guid>
		<description><![CDATA[I haven&#8217;t seen any examples on how to use the native OS browse dialogs for opening &#038; saving files, so here&#8217;s a quick example. Basically, the idea is to use the File (which extends FileReference) class, and pretend to upload or download files from the net, but not actually perform the action, and just grab [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t seen any examples on how to use the native OS browse dialogs for opening &#038; saving files, so here&#8217;s a quick example.</p>
<p>Basically, the idea is to use the File (which extends FileReference) class, and pretend to upload or download files from the net, but not actually perform the action, and just grab the file&#8217;s path directly.</p>
<p>This app allows you to load a PNG or JPEG, apply a blur effect, then save it as a JPEG again. It requires the JPGEncoder from <a href="http://code.google.com/p/as3corelib/">the AS3 corelib</a></p>
<p><a href="http://davr.org/flash/BrowseExample.mxml">Download BrowseExample.mxml</a> (only works with Apollo, not in a browser etc)</p>
<p><a href="http://davr.org/flash/BrowseExample.air">Install BrowseExample.air</a><br />
<span id="more-56"></span></p>
<pre>
<code>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:ApolloApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
	title="Browse Example"
	backgroundColor="0x222222"&gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[
			import mx.events.IndexChangedEvent;
			import mx.events.DragEvent;
			import mx.containers.Canvas;
			import mx.effects.effectClasses.BlurInstance;
			import flash.filesystem.*;
			import com.adobe.images.*;

			// File object for saving / loading
			private var file:File;

			// callback when slider is changed
			public function blurImg():void {
				// get the value from the slider
				var blurVal:Number = slider.value;

				// use the slider value to construct a blurring filter
				var filter:BlurFilter = new BlurFilter(blurVal, blurVal, 3);

				// apply the blur filter to the image
				img.filters = [filter];
			}

			public function saveImg():void {
				// start at desktop directory
				file = File.desktopDirectory; 

				// listen for when the user has selected a location to save
				file.addEventListener(Event.SELECT, onFileSave);

				// request a download a bogus file, to get the Browse dialog to pop up
				file.download(new URLRequest("http://foo/foo"), "blurred.jpg");
			}

			public function onFileSave(e:Event):void {

				// cancel the file download, since it was bogus anyway
				// now, 'file' now points at where they want to save
				file.cancel();

				// grab the pixel data from the image
				var bmpData:BitmapData = new BitmapData(img.width, img.height);
				bmpData.draw(img);

				// encode the pixel data into a JPEG
				var jpgEncoder:JPGEncoder = new JPGEncoder();
				var jpgBytes:ByteArray = jpgEncoder.encode(bmpData);

				// open a filestream from the file
				var stream:FileStream = new FileStream();
				stream.open(file, FileMode.WRITE);

				// write the jpeg data to the file
				stream.writeBytes(jpgBytes, 0, jpgBytes.length);

				// close the stream. the file is now saved.
				stream.close();				

			}

			public function loadImg():void {

				// start at the desktop directory
				file = File.desktopDirectory; 

				// listen for select event
				file.addEventListener(Event.SELECT, onFileLoad); 

				// open browse dialog to pick an image file
				file.browse([new FileFilter("Images", "*.jpg;*.png")]);
			}

			// handler for when user selects a file
			private function onFileLoad(e:Event):void {

				// 'file' now contains a url pointing at the file they selected.
				// in a flash movie, you would not have access to the full path,
				// but in apollo you do.
				trace(file.url);

				// load the image that they picked.
				// In Apollo, you can load from file://... URLs
				img.load(file.url);
			}

		]]&gt;
	&lt;/mx:Script&gt;
	&lt;mx:VBox left="5" top="5" bottom="5" right="5" horizontalAlign="center"&gt;
		&lt;mx:HBox width="100%"  horizontalAlign="center"&gt;
			&lt;mx:Button label="Load..." click="loadImg()"  /&gt;
			&lt;mx:Button label="Save as JPG..." click="saveImg()"  /&gt;
		&lt;/mx:HBox&gt;
		&lt;mx:HSlider id="slider" change="blurImg()"  minimum="1" maximum="25" snapInterval="0.2" width="90%"/&gt;
		&lt;mx:Image id="img" /&gt;
	&lt;/mx:VBox&gt;

&lt;/mx:ApolloApplication&gt;
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2007/03/28/native-file-browse-dialog-in-apollo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Lyric Station &#8211; Apollo App</title>
		<link>http://blog.davr.org/2007/03/21/lyric-station-apollo-app/</link>
		<comments>http://blog.davr.org/2007/03/21/lyric-station-apollo-app/#comments</comments>
		<pubDate>Thu, 22 Mar 2007 05:09:12 +0000</pubDate>
		<dc:creator>davr</dc:creator>
				<category><![CDATA[Apollo]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://blog.davr.org/2007/03/21/lyric-station-apollo-app/</guid>
		<description><![CDATA[I saw this post by Marcos P. who created an app for searching for song lyrics. I took it and added a few small enhancements: Download raw lyrics instead of html &#8212; saves bandwidth &#038; time Better layout &#8212; I take advantage of Flex&#8217;s layout capabilities to make the interface resizable Partial match searching &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>I saw <a href="http://www.placona.co.uk/blog/index.cfm/2007/3/21/Yet-another-first-Apollo-app--Lyric-Finder">this post by Marcos P.</a> who created an app for searching for song lyrics. I took it and added a few small enhancements:</p>
<ul>
<li>Download raw lyrics instead of html &#8212; saves bandwidth &#038; time</li>
<li>Better layout &#8212; I take advantage of Flex&#8217;s layout capabilities to make the interface resizable</li>
<li>Partial match searching &#8212; If a song is not found, I call out to the search page in the lyrics wiki, and then parse the results. This allows to find songs if you don&#8217;t know the exact name, or miss a &#8216;the&#8217;, or to browse all songs by a certain artist</li>
</ul>
<p><img src="http://davr.org/pics/lyrics.png" width="508" height="402" /></p>
<p><a href="http://davr.org/flash/LyricStation.air">LyricStation.air</a> &#8212; requires the <a href="http://labs.adobe.com/downloads/apolloruntime.html">Apollo Runtime Alpha 1</a> in order to use. AIR file also includes the source code.</p>
<p>Many thanks to Marcos for giving out the source! It&#8217;s a great learning experience to hack on other people&#8217;s code that they&#8217;ve already gotten started for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.davr.org/2007/03/21/lyric-station-apollo-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
