<?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>Confessions of a Flash Addict &#187; AIR</title>
	<atom:link href="http://www.funky-monkey.nl/blog/category/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.funky-monkey.nl/blog</link>
	<description>&#34;forgive me father for I have flashed&#34;</description>
	<lastBuildDate>Sat, 14 Jan 2012 15:47:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The big secrets to writing a technical book; Top 10 lessons learned</title>
		<link>http://www.funky-monkey.nl/blog/2011/10/18/writing-a-technical-book-lessons-learned/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=writing-a-technical-book-lessons-learned</link>
		<comments>http://www.funky-monkey.nl/blog/2011/10/18/writing-a-technical-book-lessons-learned/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 15:20:51 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[ANT]]></category>
		<category><![CDATA[Best Of]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=962</guid>
		<description><![CDATA[While writing my &#8216;Automating ActionScript Projects with Eclipse and Ant&#8217; book, I ran into a lot of problems that I hadn&#8217;t run into. Since I hadn&#8217;t written a book and was used to blog posts and articles. Writing a blog is completely different; you don&#8217;t have a strict deadline, you can write when you want [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1005" title="cover_peak" src="http://www.funky-monkey.nl/blog/wp-content/uploads/2011/09/cover_peak-150x150.png" alt="" width="150" height="150" />While writing my <a href="http://bit.ly/ant-fdt-book" target="_blank">&#8216;Automating ActionScript Projects with Eclipse and Ant&#8217;</a> book, I ran into a lot of problems that I hadn&#8217;t run into. Since I hadn&#8217;t written a book and was used to blog posts and articles. Writing a blog is completely different; you don&#8217;t have a strict deadline, you can write when you want or when you have an good idea. Book writing is different cake.</p>
<p>So here are the lessons I have learned the hard way, I organized them for you per topic:</p>
<p><strong>Coding:</strong></p>
<ul>
<li>If you can; try to write all the code that will be in the book first and get this bug free. Then write your book about it. I wrote most of my code while writing, not a good idea. This takes away a lot of extra time. So before you plan on writing a book, get your code done. For me this will be the way to go next time i&#8217;ll write a book.</li>
<li>If you get stuck with code, don&#8217;t keep pounding at it, let go and move on. You can come back to it later.</li>
</ul>
<p><strong>Focus:</strong></p>
<ul>
<li>During the writing I still had a full time job to do. Writing during the week after normal working hours is killing and drained my energy levels. Weekends are better in so many ways. You can get a decent rest, don&#8217;t sleep in and start early, you can set your own pace while still keeping yourself to your projected amount of pages to write.</li>
<li>Once I was over half of the pages, the pace began picking up. Rapidly. I think this is a mental thing. Kind of like running 10k, once you hit the 5k mark, the last 5k are more easy because &#8216;you are almost there&#8217;.</li>
</ul>
<p><strong>Writing itself</strong>:</p>
<ul>
<li>Discipline basically consists of one ingredient; doing what you need to do. And stick to it. Practice makes perfect. Pull the plug from your router and disable your wireless connection if that helps you.</li>
<li>Making a sysnopsys / outline per chapter makes you stay focused on what you want to write.</li>
<li>If you get stuck with writing, move on to the next section. And insert some sort of code that makes it easy for you to get back to that section and make revisions. I used <strong>[[[NEEDS WORK]]]</strong>. The three brackets makes it able to find it easily throughout your document.</li>
<li><strong>The big secret to writing is&#8230;.</strong> write. Quite surprisingly <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Just get started. For me this was the hard part because sometimes i had to get the discipline from my toes&#8230; Just sit and focus on getting started. Let all your other thoughts and urges pass. Notice how your mind will try to justify the distractions. Don&#8217;t give in, those urges are like waves and will disappear. (Thanks for <a href="http://zenhabits.net/tada/">Leo Babuta</a> for the focusing tips)</li>
</ul>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for The big secrets to writing a technical book; Top 10 lessons learned" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+The+big+secrets+to+writing+a+technical+book;+Top+10+lessons+learned" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2011/10/18/writing-a-technical-book-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I proudly present: Automating ActionScript Projects with Eclipse and Ant</title>
		<link>http://www.funky-monkey.nl/blog/2011/10/14/i-proudly-present-automating-your-actionscript-projects-with-eclipse-and-ant/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-proudly-present-automating-your-actionscript-projects-with-eclipse-and-ant</link>
		<comments>http://www.funky-monkey.nl/blog/2011/10/14/i-proudly-present-automating-your-actionscript-projects-with-eclipse-and-ant/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 14:32:53 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIR for Android]]></category>
		<category><![CDATA[ANT]]></category>
		<category><![CDATA[Best Of]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[FDT]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=934</guid>
		<description><![CDATA[After four months of writing, 84 pages, around 118.257 characters, 20.496 words, 1611 paragraphs, lots of sweat and the occasional tear, its finally done! While my friends were sitting in the sun drinking beers, went on boat trips, to clubs and dinner parties, I had to cancel it all. I was writing my first book. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1005" title="cover_peak" src="http://www.funky-monkey.nl/blog/wp-content/uploads/2011/09/cover_peak-225x300.png" alt="" width="225" height="300" />After four months of writing, 84 pages, around 118.257 characters, 20.496 words, 1611 paragraphs, lots of sweat and the occasional tear, its finally done!</p>
<p>While my friends were sitting in the sun drinking beers, went on boat trips, to clubs and dinner parties, I had to cancel it all. I was writing my first book.</p>
<p><strong>So without further ado: The Book.</strong><br />
You can order the book in the <a href="http://bit.ly/ant-fdt-book" target="_blank">online store at O&#8217;Reilly</a> or on <a href="http://www.amazon.com/Automating-Your-ActionScript-Projects-Eclipse/dp/1449307736/ref=sr_1_1?ie=UTF8&amp;qid=1314953529&amp;sr=8-1" target="_blank">Amazon.com</a>. If you are based in the Netherlands you can go to <a href="http://www.bol.com/nl/p/engelse-boeken/automating-your-actionscript-projects-with-eclipse-and-ant/1001004011681054/index.html" target="_blank">BOL.COM</a> and at <a href="http://www.comcol.nl/detail/77794.htm" target="_blank">Computer Collectief</a>.</p>
<p>If you read it, tell me what you think, all comments are welcome!</p>
<p>Happy coding <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS. I will announce the winners of the survey coming week on this blog! And I will contact the winner via email.</p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for I proudly present: Automating ActionScript Projects with Eclipse and Ant" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+I+proudly+present:+Automating+ActionScript+Projects+with+Eclipse+and+Ant" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2011/10/14/i-proudly-present-automating-your-actionscript-projects-with-eclipse-and-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing Chromeless YouTube video&#8217;s in AS3</title>
		<link>http://www.funky-monkey.nl/blog/2010/06/03/playing-chromeless-youtube-videos-in-as3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=playing-chromeless-youtube-videos-in-as3</link>
		<comments>http://www.funky-monkey.nl/blog/2010/06/03/playing-chromeless-youtube-videos-in-as3/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 15:58:12 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=405</guid>
		<description><![CDATA[Today me and a colleague spend a considerable amount of time looking for a way to show a chrome less YouTube Video in an AS3 project. We finally found a solution after searching the net for 2 hours Below is the code and zip file with the entire project made in FDT 4. (So you [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both;">Today me and a colleague spend a considerable amount of time looking for a way to show a chrome less YouTube Video in an AS3 project. We finally found a solution after searching the net for 2 hours <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="clear: both;">Below is the code and zip file with the entire project made in FDT 4. (So you can import it directly).</p>
<p style="clear: both;">First you instantiate an new YouTubeLoader instance. Once the load is handled you pass the url bit of the movie on youtube.</p>
<pre class="brush: javascript;">_youTubeLoader = new YouTubeLoader();
_youTubeLoader.addEventListener(YouTubeLoaderEvent.LOADED, handleVideoLoaded, false, 0, true);
_youTubeLoader.addEventListener(YouTubeLoaderEvent.STATE_CHANGE, handleVideoStateChange, false, 0, true);
_youTubeLoader.create();

function handleVideoStateChange(event : YouTubeLoaderEvent) : void {
    switch(_youTubeLoader.getPlayerState( )) {
        case "0":
            _youTubeLoader.seekTo( 0 );
            break;
        }
}

function handleVideoLoaded(event : YouTubeLoaderEvent) : void {
    // This is the YouTube movie ID
    var id : String = "WbJX4RzfJ8E";

    trace( _youTubeLoader.getPlayerState( ) + "state", toString( ) );
    _youTubeLoader.loadVideoById( id );
    _youTubeLoader.setSize( 511, 383 );
    addChild( _youTubeLoader );
    _youTubeLoader.play();
}
</pre>
<p>The only thing left now is ta make sure the ExternalInterface communication with JavaScript works as it should. So you add this to your embed tag</p>
<pre class="brush: javascript;">    //init the youTubeLoader javascript methods
    SWFID = "application";
</pre>
<p>Then you complete embed tag becomes the following;</p>
<pre class="brush: javascript;"><script src="static/js/swfobject.js" type="text/javascript"><!--mce:0--></script>
<script src="static/js/youTubeLoader.js" type="text/javascript"><!--mce:1--></script>
<script type="text/javascript"><!--mce:2--></script>
</pre>
<p><a href="http://www.funky-monkey.nl/blog/wp-content/uploads/2010/05/youtube_video_player.zip">Here is the zip with the complete project.</a></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for Playing Chromeless YouTube video's in AS3" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+Playing+Chromeless+YouTube+video's+in+AS3" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2010/06/03/playing-chromeless-youtube-videos-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing Chromeless YouTube video&#039;s in AS3</title>
		<link>http://www.funky-monkey.nl/blog/2010/06/03/playing-chromeless-youtube-videos-in-as3-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=playing-chromeless-youtube-videos-in-as3-2</link>
		<comments>http://www.funky-monkey.nl/blog/2010/06/03/playing-chromeless-youtube-videos-in-as3-2/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 15:58:12 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=405</guid>
		<description><![CDATA[Today me and a colleague spend a considerable amount of time looking for a way to show a chrome less YouTube Video in an AS3 project. We finally found a solution after searching the net for 2 hours Below is the code and zip file with the entire project made in FDT 4. (So you [...]]]></description>
			<content:encoded><![CDATA[<p style="clear: both;">Today me and a colleague spend a considerable amount of time looking for a way to show a chrome less YouTube Video in an AS3 project. We finally found a solution after searching the net for 2 hours <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="clear: both;">Below is the code and zip file with the entire project made in FDT 4. (So you can import it directly).</p>
<p style="clear: both;">First you instantiate an new YouTubeLoader instance. Once the load is handled you pass the url bit of the movie on youtube.</p>
<pre class="brush: javascript;">_youTubeLoader = new YouTubeLoader();
_youTubeLoader.addEventListener(YouTubeLoaderEvent.LOADED, handleVideoLoaded, false, 0, true);
_youTubeLoader.addEventListener(YouTubeLoaderEvent.STATE_CHANGE, handleVideoStateChange, false, 0, true);
_youTubeLoader.create();

function handleVideoStateChange(event : YouTubeLoaderEvent) : void {
    switch(_youTubeLoader.getPlayerState( )) {
        case "0":
            _youTubeLoader.seekTo( 0 );
            break;
        }
}

function handleVideoLoaded(event : YouTubeLoaderEvent) : void {
    // This is the YouTube movie ID
    var id : String = "WbJX4RzfJ8E";

    trace( _youTubeLoader.getPlayerState( ) + "state", toString( ) );
    _youTubeLoader.loadVideoById( id );
    _youTubeLoader.setSize( 511, 383 );
    addChild( _youTubeLoader );
    _youTubeLoader.play();
}
</pre>
<p>The only thing left now is ta make sure the ExternalInterface communication with JavaScript works as it should. So you add this to your embed tag</p>
<pre class="brush: javascript;">    //init the youTubeLoader javascript methods
    SWFID = "application";
</pre>
<p>Then you complete embed tag becomes the following;</p>
<pre class="brush: javascript;"><script src="static/js/swfobject.js" type="text/javascript"><!--mce:0--></script>
<script src="static/js/youTubeLoader.js" type="text/javascript"><!--mce:1--></script>
<script type="text/javascript"><!--mce:2--></script>
</pre>
<p><a href="http://www.funky-monkey.nl/blog/wp-content/uploads/2010/05/youtube_video_player.zip">Here is the zip with the complete project.</a></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for Playing Chromeless YouTube video&#039;s in AS3" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+Playing+Chromeless+YouTube+video&#039;s+in+AS3" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2010/06/03/playing-chromeless-youtube-videos-in-as3-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR 2.0 (Athena) is here! NATIVE USB SUPPORT!</title>
		<link>http://www.funky-monkey.nl/blog/2009/07/13/air-2-0-athenais-here-native-usb-support/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=air-2-0-athenais-here-native-usb-support</link>
		<comments>http://www.funky-monkey.nl/blog/2009/07/13/air-2-0-athenais-here-native-usb-support/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 22:13:16 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=124</guid>
		<description><![CDATA[Well almost But i can give you a sneak peak. It does include some really nice new features like detecting changes in Mass storage devices. There is a new Class called StorageVolumeChangeEvent which dispatches two different events (STORAGE_VOLUME_MOUNT and STORAGE_VOLUME_UNMOUNT) when an USB device is mounted/unmounted (Think camera, external HDD and USB stick). I cannot [...]]]></description>
			<content:encoded><![CDATA[<p>Well almost <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But i can give you a sneak peak.</p>
<p>It does include some really nice new features like detecting changes in Mass storage devices. There is a new Class called <strong>StorageVolumeChangeEvent </strong>which dispatches two different events (<strong>STORAGE_VOLUME_MOUNT</strong> and <strong>STORAGE_VOLUME_UNMOUNT</strong>) when an USB device is mounted/unmounted (Think camera, external HDD and USB stick). I cannot tell you the specifics about it yet, but I&#8217;ve done some tests and it works like a charm!</p>
<p>There will also be some other long awaited extras that will be very VERY funky!<br />
So check out <a href="http://labs.adobe.com/technologies/flash/videos/flashcamp/gourdol/" target="_blank">this video</a> to see all of it!</p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for AIR 2.0 (Athena) is here! NATIVE USB SUPPORT!" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+AIR+2.0+(Athena)+is+here!+NATIVE+USB+SUPPORT!" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2009/07/13/air-2-0-athenais-here-native-usb-support/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FullScreen mode in AS3 and AIR</title>
		<link>http://www.funky-monkey.nl/blog/2009/01/15/fullscreen-mode-in-air/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fullscreen-mode-in-air</link>
		<comments>http://www.funky-monkey.nl/blog/2009/01/15/fullscreen-mode-in-air/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 13:00:55 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=76</guid>
		<description><![CDATA[Since the overwhelming response I got when I wrote about full screen mode in AS2, i decided to write a follow up about it in AS3 and AIR. The StageDisplayState Class in Actionscript 3 has two states, NORMAL and FULL_SCREEN the AIR API add one more; FULL_SCREEN_INTERACTIVE. (WARNING! This is only available in AIR.) So [...]]]></description>
			<content:encoded><![CDATA[<p>Since the overwhelming response I got<a href="http://www.funky-monkey.nl/blog/2007/09/10/fullscreen-mode-in-as2/"> when I wrote about full screen mode in AS2</a>, i decided to write a follow up about it in AS3 and AIR.</p>
<p>The StageDisplayState Class in Actionscript 3 has two states, NORMAL and FULL_SCREEN the AIR API add one more; FULL_SCREEN_INTERACTIVE. (<span style="color: #ff0000;">WARNING! This is only available in AIR</span>.)</p>
<p>So that means that we now have two modes for full screen, StageDisplayState.FULL_SCREEN and StageDisplayState.FULL_SCREEN_INTERACTIVE. The first just resizes your application in full screen however you cannot interact with it. All the controls like input fields and buttons are disabled. The last one, StageDisplayState.FULL_SCREEN_INTERACTIVE, does allow the user to interact with your application. This can be very convenient when developing for kiosks, fullscreen video players, image viewers etc. Remember that control bar youtube has when playing video in full screen? Now you can have that too! So on with the code!</p>
<p>What works best for me is that i always set the scaleMode to no_scale, so i know that all my content will be shown at 100% and is not stretched. I set it up like so:</p>
<pre class="brush: javascript;">stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
</pre>
<p>When we click the fullscreen button we need to check in what state we are in and change that to the full screen mode. and we need to be albe to respond to the resize event, so when we switch states our content is sized accordingly. (Also make sure that your content is positioned relatively and not with hard coded values)</p>
<pre class="brush: javascript;">stage.nativeWindow.addEventListener( Event.RESIZE, onResizeApp );
fullscreenButton.addEventListener( MouseEvent.CLICK, onFullscreenClick );

function onResizeApp( event:Event ):void {
// do repositioning of elements here
}

function onFullscreenClick( event:MouseEvent ):void {
if( stage.displayState == StageDisplayState.NORMAL ) {
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
fullscreenButton.label = "Exit Fullscreen";
} else {
stage.displayState = StageDisplayState.NORMAL;
fullscreenButton.label = "Go Fullscreen";
}
}
</pre>
<p>So there you have it, an interactive full screen application. <a href="http://www.funky-monkey.nl/blog/upload/FullScreenInAIR.rar">Source Files</a> are included for you to play with. Have fun <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for FullScreen mode in AS3 and AIR" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+FullScreen+mode+in+AS3+and+AIR" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2009/01/15/fullscreen-mode-in-air/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Synchronous vs. Asynchonous explained</title>
		<link>http://www.funky-monkey.nl/blog/2009/01/13/synchronous-vs-asynchonous/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=synchronous-vs-asynchonous</link>
		<comments>http://www.funky-monkey.nl/blog/2009/01/13/synchronous-vs-asynchonous/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 13:00:53 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=107</guid>
		<description><![CDATA[A friend of mine asked me the difference between Synchronous and Asynchronous file operations in AIR. So here I will try to explain for all that are interested. A FileStream object is used to read and write files. Files can be opened synchronously by calling the open() method or asynchronously by calling the openAsync() method. [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.1hoog.nl/">friend of mine</a> asked me the difference between Synchronous and Asynchronous file operations in AIR. So here I will try to explain for all that are interested.</p>
<p>A FileStream object is used to read and write files. Files can be opened synchronously by calling the   <strong>open()</strong> method or asynchronously by calling the <strong>openAsync()</strong> method.</p>
<p><strong>Synchronous File operations:</strong><br />
The benefit of using sync file operations is that it uses far less code to complete a file load and should actually only be used on small files. The rule of thumb I use is &lt; 1MB.</p>
<pre class="brush: javascript;">
import flash.filesystem.*;

var file:File = File.documentsDirectory;
file = file.resolvePath("someFile.txt");
var fs:FileStream = new FileStream();
fs.open(file, FileMode.READ);
var data:String = fs.readUTFBytes(fs.bytesAvailable, File.systemCharset);
fs.close();
</pre>
<p>When a file is loaded in in an sync matter the rest of the application is halted/ it freezes until the complete file is loaded in. This is one of the reasons why you should only use this on small files.</p>
<p><strong>Aynchronous File operations:</strong></p>
<p>The advantage of opening files asynchronously is that other code still runs while in the background while the read and write operations are done. When opened asynchronously, progress events are dispatched as operations proceed.</p>
<p>It uses more code to handle a loading of an file:</p>
<pre class="brush: javascript;">
import flash.filesystem.*;

var file:File = File.documentsDirectory;
file = file.resolvePath("someFile.txt");

var fs:FileStream = new FileStream();
fs.addEventListener(Event.COMPLETE, onComplete);
fs.addEventListener(ProgressEvent.PROGRESS, onFileProgress);
fs.addEventListener(ProgressEvent.OUTPUT_PROGRESS, onFileOutputProgress);
fs.open(file, FileMode.READ);

function onComplete( e:Event ):void {
	var data:String = fs.readUTFBytes(fs.bytesAvailable, File.systemCharset);
	fs.close();
}
function onFileProgress( e:ProgressEvent):void {
        // You can show a loader while its still processing
        // Signals the availability of new data on the stream.
	trace(e.bytesLoaded);
}
function onFileOutputProgress( e:ProgressEvent):void {
        // You can show a loader while its still processing
        // Signals that buffered data has been written to the file.
	trace(e.bytesTotal, e.bytesPending);
}
</pre>
<p>For prototyping synchronous is the way to go, because it is fast and not used in real life situations. If you have really big files you are loading in, FLV files that are 500 MB or other huge files, asynchronous is your best option.<br />
I hope this clears things up about the difference in loading files in different manners. Comments are always welcome!</p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for Synchronous vs. Asynchonous explained" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+Synchronous+vs.+Asynchonous+explained" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2009/01/13/synchronous-vs-asynchonous/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A breath of fresh AIR #3: User Idle time</title>
		<link>http://www.funky-monkey.nl/blog/2008/12/08/a-breath-of-fresh-air-3-user-idle-time/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-breath-of-fresh-air-3-user-idle-time</link>
		<comments>http://www.funky-monkey.nl/blog/2008/12/08/a-breath-of-fresh-air-3-user-idle-time/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 11:00:44 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[A Fresh Breath of AIR]]></category>
		<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=91</guid>
		<description><![CDATA[In AIR you can check the users idle time, meaning that your application can behave differently when the user is not actively using it. On the other side you can also track the time that the user is actively using your application. But what you ask? Let me give you a couple of examples: - [...]]]></description>
			<content:encoded><![CDATA[<p>In AIR you can check the users idle time, meaning that your application can behave differently when the user is not actively using it. On the other side you can also track the time that the user is actively using your application. But what you ask? Let me give you a couple of examples:</p>
<p>- When you are not idle for a period of time, the application syncs with and online database.<br />
- Complex Screensavers &#8211; Show full screen for how long the user has been away from its desk <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
- An Application that warns you when to take breaks because you been sitting way too long behind your computer. The possibilities are endless!</p>
<p>Other fun functions you can use with this is:</p>
<p><strong>timeSinceLastUserInput</strong> &#8212; The time, in seconds, since the last mouse or keyboard input.<br />
and</p>
<p><strong>idleThreshold </strong>&#8211; The number of seconds that must elapse without keyboard or mouse input     before a presenceChange event is dispatched. By default, the idle threshold is 300 seconds (5 minutes).</p>
<pre class="brush: javascript;">
import flash.desktop.NativeApplication;
import nl.funkymonkey.firelog.core.*;
var IDLETIME:int = 5;//Yes that is seconds.

initIdleExampleApp();

function initIdleExampleApp():void
{
	NativeApplication.nativeApplication.idleThreshold = IDLETIME;
	NativeApplication.nativeApplication.addEventListener(Event.USER_IDLE, onUserIdle);
	NativeApplication.nativeApplication.addEventListener(Event.USER_PRESENT, onUserPresence);
	Logger.info("Status: Active - status will change if idle for more than " + IDLETIME + " seconds");
}

function onUserIdle(event:Event):void
{
	Logger.info("User has been Idle for at least " + IDLETIME + " seconds".);
	Logger.info("Here you can do what you want.");
}

function onUserPresence(event:Event):void
{
	Logger.info("User is active again, after being idle for " + IDLETIME + " seconds.");
	Logger.info("Now you can make your app get back to its normal state.");
}
</pre>
<p>What I have noticed with idle time is that the time is an indication and not a real value, it can be a second or two off (this can be caused by the Timer class, as <a href="http://www.bit-101.com/blog/?p=910" target="_blank">Keith Peters describes here</a>). So keep that in mind.</p>
<p>In my code I trace with <a href="http://www.funky-monkey.nl/blog/2008/05/13/air-logger-v100/" target="_self">FireLog</a>, a simple logger for AIR, and you can <a href="http://www.funky-monkey.nl/blog/2008/05/13/air-logger-v100/" target="_self">find that here</a>.</p>
<p>Here is an example AIR file:<br />
[airbadge]Idle User,http://www.funky-monkey.nl/air/example/idle_screensaver.air,1.0.2[/airbadge]<br />
Have fun coding you own little play things! <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for A breath of fresh AIR #3: User Idle time" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+A+breath+of+fresh+AIR+#3:+User+Idle+time" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2008/12/08/a-breath-of-fresh-air-3-user-idle-time/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The secret to making money with your RIA / AIR application</title>
		<link>http://www.funky-monkey.nl/blog/2008/10/23/the-secret-to-making-money-with-your-ria-air-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-secret-to-making-money-with-your-ria-air-application</link>
		<comments>http://www.funky-monkey.nl/blog/2008/10/23/the-secret-to-making-money-with-your-ria-air-application/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 13:10:58 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=84</guid>
		<description><![CDATA[What is the secret to making money with your RIA / AIR application? Watch this video and you will know all about it. Great video from Startup School 08. Please consider to buying me a coffee.]]></description>
			<content:encoded><![CDATA[<p>What is the secret to making money with your RIA / AIR application? Watch this video and you will know all about it. Great video from <a title="Startup School 2008" href="http://omnisio.com/startupschool08" target="_blank">Startup School 08</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="520" height="276" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="bgcolor" value="#FFFFFF" /><param name="quality" value="high" /><param name="allowscriptaccess" value="always" /><param name="allowfullscreen" value="true" /><param name="src" value="http://www.omnisio.com/bin/Embed.swf?embedID=dvkTBcd0Sr3yehadbiFy2w" /><embed type="application/x-shockwave-flash" width="520" height="276" src="http://www.omnisio.com/bin/Embed.swf?embedID=dvkTBcd0Sr3yehadbiFy2w" allowfullscreen="true" allowscriptaccess="always" quality="high" bgcolor="#FFFFFF"></embed></object></p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for The secret to making money with your RIA / AIR application" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+The+secret+to+making+money+with+your+RIA+/+AIR+application" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2008/10/23/the-secret-to-making-money-with-your-ria-air-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thawte finally responds, I got my AIR Code Signing Certificate. WHOHOO!</title>
		<link>http://www.funky-monkey.nl/blog/2008/08/03/thawte-finally-responds-i-got-my-air-code-signing-certificate-whohoo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=thawte-finally-responds-i-got-my-air-code-signing-certificate-whohoo</link>
		<comments>http://www.funky-monkey.nl/blog/2008/08/03/thawte-finally-responds-i-got-my-air-code-signing-certificate-whohoo/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 13:13:38 +0000</pubDate>
		<dc:creator>Sidney de Koning</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.funky-monkey.nl/blog/?p=82</guid>
		<description><![CDATA[After applying for the the Adobe AIR Certificate Offer promotion , and sending all the appropriate documents to Thawte, I finally got my AIR SSL certificate for secure code singing (worth $300). Thawte is not the fastest company when it comes to replying back to the customer or sending notifications when they say they will. [...]]]></description>
			<content:encoded><![CDATA[<p>After applying for the the <a title="Free AIR Certificate" href="http://www.adobe.com/products/air/assets/popup/thawte_popup.html" target="_blank">Adobe AIR Certificate Offer promotion</a> , and sending all the appropriate documents to Thawte, I finally got my AIR SSL certificate for secure code singing (worth $300).</p>
<p>Thawte is not the fastest company when it comes to replying back to the customer or sending notifications when they say they will. It took me almost two months to get it. (Got to love outsourced customer support where every employee is named the same and are based in Africa, Germany and England. Where can I declare the costs of these endless conversations, couldn&#8217;t find it on their site? <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  . Glad to got that off my chest <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Anyway, I finally have it, and am a very happy camper! Thank you Adobe and Thawte!</p>
<p>Below is a screenshot:</p>
<p><img src="http://www.funky-monkey.nl/blog/upload/cert_funky.jpg" alt="SSL Certificate" /></p>
<p>At the <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;loc=en_us&amp;extid=1556018" target="_blank">Adobe AIR Marketplace</a> you can <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;loc=en_us&amp;extid=1556018" target="_blank">download the new version</a> of my <a href="http://www.funky-monkey.nl/blog/2008/04/20/tax-calculator-updated-to-air-version-10/" target="_blank">Funky TAX Calculator</a>. Feature requests, bugs or remarks &#8211; place them in the comments <img src='http://www.funky-monkey.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="sidney@funky-monkey.nl" /><input type="hidden" name="return" value="" /><input type="hidden" name="item_name" value="Have my posts helped (or at least entertained) you in some way? Please consider to buying me a coffee. for Thawte finally responds, I got my AIR Code Signing Certificate. WHOHOO!" /><input type="hidden" name="currency_code" value="EUR" /><input type="hidden" name="amount" value="5" /><input type="image" src="http://www.funky-monkey.nl/blog/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="Coffee!" title="Coffee!" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=sidney@funky-monkey.nl&amp;currency_code=EUR&amp;amount=5&amp;return=&amp;item_name=Have+my+posts+helped+(or+at+least+entertained)+you+in+some+way?+Please+consider+to+buying+me+a+coffee.+for+Thawte+finally+responds,+I+got+my+AIR+Code+Signing+Certificate.+WHOHOO!" target="paypal">Please consider to buying me a coffee.</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.funky-monkey.nl/blog/2008/08/03/thawte-finally-responds-i-got-my-air-code-signing-certificate-whohoo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

