<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Flashgamer</title>
      <link>http://www.flashgamer.com/</link>
      <description>Flash, Games and Flash Games</description>
      <language>en</language>
      <copyright>Copyright 2010</copyright>
      <lastBuildDate>Tue, 07 Sep 2010 13:35:05 +0100</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=3.2</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>Getting an extra item in your list control?</title>
         <description><![CDATA[<p>Had a stupid bug that cost me a lot of time so I figured I'd post the solution here in case others stumble onto the same problem.</p>

<p>I had an app with a Horizontal List control and for some reason, Flex insisted on adding an extra item to my list whenever I added a new item to it? Strange. This only happened after I converted the project to Flex 4 and when I went back to Flex 3, it worked as it should. I debugged and confirmed that it was getting the correct dataprovider and despite there being only two items in the dataprovider, three items were rendered.</p>

<p>I looked and looked in all the wrong places until I noticed that I was setting "horizontalScrollPosition" to -1? Why on earth was I doing that? Turns out that if you do this, Flex 4 will create the missing item in your list rather than throwing an "out of bounds" error. Hope this helps someone else with a similar problem!</p>]]></description>
         <link>http://www.flashgamer.com/2010/09/getting_an_extra_item_in_your.html</link>
         <guid>http://www.flashgamer.com/2010/09/getting_an_extra_item_in_your.html</guid>
         <category>Flex</category>
         <pubDate>Tue, 07 Sep 2010 13:35:05 +0100</pubDate>
      </item>
            <item>
         <title>Review: ExpressionEngine 2 - A quick-start guide</title>
         <description><![CDATA[<p><img alt="ee2_ryan2.jpg" src="http://www.flashgamer.com/img/ee2_ryan2.jpg" align="left" />These days I do more and more sites and apps using ExpressionEngine (EE) as the backend. I recently did my 10th EE-driven site and I have request for a couple more in the pipe. It seems that EE is really starting to take off and also so with the publishers. I recently got a request to review an EE2 book from Pragmatic Bookshelf and thought why not?</p>

<p>I've read a couple books on EE, but this is the first I've seen that covers the new ExpressionEngine 2. The book is written by Ryan Irelan (of <a href="http://eeinsider.com/">EE-insider</a> fame) and has a foreword by Rick Ellis (the creator of EE) so it sure seems solid.</p>]]></description>
         <link>http://www.flashgamer.com/2010/09/review_expressionengine_2_a_qu.html</link>
         <guid>http://www.flashgamer.com/2010/09/review_expressionengine_2_a_qu.html</guid>
         <category>ExpressionEngine</category>
         <pubDate>Sun, 05 Sep 2010 22:01:51 +0100</pubDate>
      </item>
            <item>
         <title>BigImageLoader now supporting even bigger images</title>
         <description><![CDATA[<p>Just a quick post to tell that my <a href="http://www.flashgamer.com/2010/01/handling_user_upload_of_big_im.html">AS3 class for handling upload of big images</a> have been updated to catch errors where a user will upload images larger than 20Mpix.</p>

<p>PS: it's been silent here lately, but I'm quite <a href="http://twitter.com/jenschr">active on Twitter</a> :)</p>]]></description>
         <link>http://www.flashgamer.com/2010/08/bigimageloader_now_supporting.html</link>
         <guid>http://www.flashgamer.com/2010/08/bigimageloader_now_supporting.html</guid>
         <category>Flash</category>
         <pubDate>Mon, 23 Aug 2010 13:35:27 +0100</pubDate>
      </item>
            <item>
         <title>gotoAndSki();</title>
         <description><![CDATA[<p>Just a quick update to tell that I've been working with UG manager <a href="http://back.no">Thomas Nesse</a> to put on a FlashCamp in Norway. It's called <a href="http://gotoAndSki.com">gotoAndSki();</a> and will be hosted at Juvasshytta by the foot on Northern Europe's largest mountain - Galdhøpiggen! There's a summer ski resort there so we'll go snowboarding during day and have the FlashCamp in the evenings :-D</p>

<p>I'm really looking forward to this event and it's all in English so feel free to join us! One of the things I can't wait to try is getting my internals rearranged using <a href="http://fcolaco.com">Fernando's</a> <a href="http://www.youtube.com/watch?v=-_RiY_uvgkk">Airboards</a>! </p>

<p><a href="http://gotoAndSki.com"><img alt="gotoAndSki_small.jpg" src="http://www.flashgamer.com/img/gotoAndSki_small.jpg" width="500" height="133" /><br />
</a><br />
</p>]]></description>
         <link>http://www.flashgamer.com/2010/06/gotoandski.html</link>
         <guid>http://www.flashgamer.com/2010/06/gotoandski.html</guid>
         <category>Flash</category>
         <pubDate>Wed, 02 Jun 2010 09:57:18 +0100</pubDate>
      </item>
            <item>
         <title>Converting from Wordpress to ExpressionEngine</title>
         <description><![CDATA[<p>Some of the sites I convert to ExpressionEngine (EE) are made using Wordpress. I really like Wordpress. It's super easy to use and set up, but for more complex sites it's just not up to the task. EE is the soulution, but how do you migrate the old content into EE? There's several possible solutions, but they all seemed <a href="http://expressionengine.com/wiki/Migrate_To_EE/">cumbersome or outdated</a> so I figured I'd make something better and easier.</p>

<p>Adobe AIR makes it a breeze to make utility applications like this and the result is "WP2MT", a small app that reads the XML file you can export from WordPress and saves the contents to the <a href="http://www.sixapart.com/movabletype/docs/mtimport/">Movable Type Import Format</a> that <a href="http://expressionengine.com/docs/cp/admin/utilities/movabletype_import_utility.html">EE can import from</a>. Click the Badge at the bottom to install the application.</p>

<h2>How it works</h2>
<p>Start by exporting the Wordpress content to the WordPress eXtended RSS or WXR format. Depending on what version of WordPress you use, you'll find this under the Tools or the Manage menu in your WordPress control panel.</p>

<p>Install and start the app. Click the "Open File" button at the bottom and browse to the XML file you just exported. The app will now show a summary of the XML file, showing the number of posts, pages, comments and discarded items (revisions of articles or attachments). You'll also see how many of these that are unpublished and you can choose if you want to include these.</p>

<p>Next hit the export buttons to create a text file containing either the pages or posts. That's it.</p>

<p>One thing not included in the MovableType format is the original URL of the entry, so I've added a custom field for EE that's called 'EXTRA FIELD-1'. By making an extra field for this, you'll be able to look up what url entries had before and you can also check against this field to see if an entry was added after the export.</p>

<p>Feedback is much appreciated and if you have WP files that won't import, send them to jenschr [at) gmail [dot) com and I'll see if I can fix it.</p>
<div id="flashcontent" style="width:215px; height:180px;">
		<strong>Please upgrade your Flash Player</strong>
		This is the content that would be shown if the user does not have Flash Player 6.0.65 or higher installed.
	</div>
	<script type="text/javascript"><!--
var so = new SWFObject("/a/wp2mt/AIRInstallBadge.swf", "", "215", "180", "9.0.115", "#000000");
so.addVariable("airversion", "1.5.3");
so.addVariable("appname", "Wordpress%20to%20MovableType%20converter");
so.addVariable("appurl", "http://www.flashgamer.com/a/wp2mt/WP2MT.air");
so.addVariable("image", "/a/wp2mt/wp2mt.jpeg");
so.addVariable("appid", "WP2MT"); so.addVariable("appversion", "1.0");
so.addVariable("hidehelp", "true"); so.write("flashcontent");
	// --></script>
<p>You can also <a href="http://www.flashgamer.com/a/wp2mt/WP2MT.air">download the .air file directly from here</a>. If you don't use the Badge above, you may need to install the <a href="http://get.adobe.com/air/">AIR runtime</a> as well.</p>]]></description>
         <link>http://www.flashgamer.com/2010/04/converting_from_wordpress_to_e.html</link>
         <guid>http://www.flashgamer.com/2010/04/converting_from_wordpress_to_e.html</guid>
         <category>ExpressionEngine</category>
         <pubDate>Mon, 26 Apr 2010 21:28:38 +0100</pubDate>
      </item>
            <item>
         <title>AVM2 bug when rolling over movieclips</title>
         <description><![CDATA[<p>When making examples for a recent workshop, I stumbled over a bug in the Actionscript Virtual Machine used for Flash Player 9 and higher (AVM2). If you are using a movieclip inside a button, the hit area won't work as it should. When moving the mouse across the button, it will constantly blink giving a very flimsy impression. You can test this in the example below.</p>

<div id="avmbug"><strong>This content requires Flash Player 9 (or a more recent version). <noscript>Make sure JavaScript is turned on. </noscript>You need to <a href="http://www.adobe.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash" target="_blank"><span style="text-decoration: underline;">upgrade your Flash Player</span></a></strong></div>
<script type="text/javascript"><!--
var soavmbug = new SWFObject("/a/avmbug/avmbug.swf", "soavmbug2", "500", "80", "9", "#ffffff", true);
soavmbug.write("avmbug");
// --></script>

<p>Here's source files that show the bug and the fix <a href="/a/avmbug/avmbug.fla">FLA</a> - <a href="/a/avmbug/avmbug.swf">SWF</a> - <a href="/a/avmbug/TwoStateButton.as">TwoStateButton.as</a></p>

<p>Switching the movieclip to graphic fixes the issue, but why won't this work? It's always worked well before, so this must be a bug in AVM2? Another thing is that if you hover this button for a few seconds, the Flash IDE crashes instantly...</p>

<p>If you're unable to repoduce the bug - feel free to <a href="http://www.youtube.com/watch?v=zVOIq2aNcOc">check this video that shows it</a> and please post a comment telling what Flash Player version/browser you are using. I've been able to reproduce the bug on all OSX browsers + IE8 on Win7.</p>

<p>Submitted this as a bug in the bugbase <a href="https://bugs.adobe.com/jira/browse/FP-4396">https://bugs.adobe.com/jira/browse/FP-4396</a></p>]]></description>
         <link>http://www.flashgamer.com/2010/04/avm2_bug_when_rolling_over_mov.html</link>
         <guid>http://www.flashgamer.com/2010/04/avm2_bug_when_rolling_over_mov.html</guid>
         <category>Flash</category>
         <pubDate>Thu, 22 Apr 2010 10:38:03 +0100</pubDate>
      </item>
            <item>
         <title>Away3D training - across the world</title>
         <description><![CDATA[<p>My friend Rob Bateman is setting up Away3D workshops all over the world these days - Sao Paulo, Buenos Aries, Sydney and <a href="http://www.lfpug.com/the-beginners-guide-to-away3d-05-2010/">London</a>. If you've been thinking about getting into 3D in Flash, I highly recommending attending one of these workshops. They'll teach you all you need to get started.</p>

<p>Rob is also the lead developer of Away3D and has done lots of workshops on it so he is certainly the one to learn from. <a href="http://away3d.com/international-training-events">Read more on the Away3D Blog</a>.</p>

<p><a href="http://www.lfpug.com/the-beginners-guide-to-away3d-05-2010/"><img alt="a3d_training.jpg" src="http://www.flashgamer.com/img/a3d_training.jpg" width="500" height="123" /></a></p>]]></description>
         <link>http://www.flashgamer.com/2010/04/away3d_training.html</link>
         <guid>http://www.flashgamer.com/2010/04/away3d_training.html</guid>
         <category>Flash</category>
         <pubDate>Wed, 21 Apr 2010 19:33:14 +0100</pubDate>
      </item>
            <item>
         <title>Flash MP3 player for JavaScript (update)</title>
         <description><![CDATA[<p>Some time ago, I got a request from a friend for a Flash based music player that could be controlled from JavaScript. Since Flash is ubiquitous he now does not need to think about what kinds of audio the various browsers support. I've now updated the code to include looping the music as well, so feel free to use it and pass it on to other JavaScript devs.</p>

<p><a href="http://www.flashmagazine.com/articlefiles/mp3/mp3player.html">Example: Javascript audio player</a> - <a href="http://www.flashmagazine.com/articlefiles/mp3/mp3player.swf">SWF file</a>  - <a href="http://www.flashmagazine.com/articlefiles/mp3/mp3player.as">Actionscript class</a> - <a href="http://www.flashmagazine.com/articlefiles/mp3/mp3player.fla">FLA file</a></p>]]></description>
         <link>http://www.flashgamer.com/2010/03/flash_mp3_player_for_javascrip_1.html</link>
         <guid>http://www.flashgamer.com/2010/03/flash_mp3_player_for_javascrip_1.html</guid>
         <category></category>
         <pubDate>Fri, 12 Mar 2010 12:39:52 +0100</pubDate>
      </item>
            <item>
         <title>Handling user upload of big images</title>
         <description><![CDATA[<p>Working a lot these days so few posts, but I made a class for a project that some may find handy. When you let users upload pictures using the Flash Player 10 local FileReference feature, you can get all kinds of image sizes (and content!). Most modern cameras have quite a few megapixels and Flash Player 10 can easily choke on large pictures.</p>

<p>FP10 has problems with images that have width or height larger than 8191 pixels. This is still much better than the 2880x2880 pixels we had to work with in FP9 so that alone is a great reason to insist on FP10 for this kind of applications. There is also another limitation mentioned in the official documentation that says "the total number of pixels cannot exceed 16,777,215 pixels". I've found that this isn't a problem for this implementation, so users can easily upload 8000x8000 pixel images without causing problems. The class will take the uploaded image and scale it to whatever max size you want. If the uploaded image is smaller than the max, it'll leave the image unchanged.</p>

<p>Using the class is straightforward. Just make an instance and pass in what you want returned as the maximum width/height:</p>

<p><code class="brush: actionscript;">var bigImageHandler:BigImagehandler;<br />
bigImageHandler = new BigImagehandler( 1500 );<br />
</code></p>

<p>and then add listeners to respond to what the user does:</p>

<p><code class="brush: actionscript;">bigImageHandler.addEventListener(Event.CANCEL, userFail);<br />
bigImageHandler.addEventListener(Event.COMPLETE, userSuccess);<br />
bigImageHandler.addEventListener(Event.CLOSE, userCancel);<br />
</code></p>

<p><a href="/a/bigimage/bin-release/BigImageExample.html">Click here for example</a> <a href="/a/bigimage/bin-release/srcview/">(Source code)</a></p>

<p>The project I did this for is also quite cool and I'll give a small presentation of it on the next <a href="http://www.fugn.com/">FUGN meetup</a>. It's a small app that'll allow you to make yourself old. Just upload an image (or use a WebCam), position facial features and you can turn on/off wrinkles, hair and more. Feel free to give it a spin! Click the image my old self to get started making your own. (Note: the app is in Norwegian, but I'm sure you'll figure it out by just clicking around)</p>

<p><a href="http://kampanje.helseogsosialfag.no/bligammel/"><img alt="bligammel.jpg" src="http://www.flashgamer.com/img/bligammel.jpg" width="400" height="400" /></a><br />
</p>]]></description>
         <link>http://www.flashgamer.com/2010/01/handling_user_upload_of_big_im.html</link>
         <guid>http://www.flashgamer.com/2010/01/handling_user_upload_of_big_im.html</guid>
         <category>Flash</category>
         <pubDate>Thu, 28 Jan 2010 14:17:39 +0100</pubDate>
      </item>
            <item>
         <title>Extra return in Textfields</title>
         <description><![CDATA[<p>Spent some time debugging a strange issue today where input-textfields always contained an undesired extra line. Since I found little info via Google, I'm posting it here for future reference. </p>

<p>If you make a multiline textfield with a border and autoSize set, you'll see the problem easily. Every time the .htmlText property is set, an extra line is appended. It is not a newline character (\n), but rather a return (\r). This is done by the Flash Player itself and I can't find a good reason? You can <a href="http://www.flashgamer.com/a/TFBug.swf">see the bug here</a> (<a href="http://www.flashgamer.com/a/TFBug.as">source</a>). I've reported the bug in the <a href="https://bugs.adobe.com/jira/browse/FP-3351">Flash Player bugbase</a> and initially I had no solution to the bug.</p>

<p>Then, my friend <a href="http://blog.closier.nl/">Fabrice</a> found a solution. Adding this line after seting htmlText solves the issue:<br />
<pre><code>tf.htmlText = tf.htmlText.substring(0,tf.htmlText.length-1);</code></pre><br />
</p>]]></description>
         <link>http://www.flashgamer.com/2009/12/extra_return_in_textfields.html</link>
         <guid>http://www.flashgamer.com/2009/12/extra_return_in_textfields.html</guid>
         <category>Flash</category>
         <pubDate>Tue, 01 Dec 2009 16:51:39 +0100</pubDate>
      </item>
            <item>
         <title>FDT quick tips for Flash Player 10</title>
         <description><![CDATA[<p>Just a quick post to save this somewhere. Two important things when using <a href="http://fdt.powerflasher.com/">FDT</a> for Flash Player 10 projects:<br />
<ol><br />
<li>Remember to set the target-player parameter in your Compiler Arguments for both the Debug and Run configuration (-target-player=10.0.0.0)</li><br />
<li>When using the Embed-tag in FDT, you can't use the "Pure" config. You have to use the ordinary one</li><br />
</ol>I haven't seen this noted anywhere and I couldn't find it on Google. Guess it's worth posting. Another thing that have bitten me when working with FDT - asset paths require a starting slash like this:</p>

<pre>		[Embed(source="/image.jpg")]
		private var img1:Class;</pre>
Another thing that will come in handy is <a href="http://www.flexdeveloper.eu/forums/flex-builder-flash-builder-eclipse/list-of-flex-compiler-arguments/">this list of Flex Compiler arguments</a>. FDT does not set/update any of these automatically, so it's really handy. I keep having mixed feelings about FDT. There's so many nice things, but all the rough edges seem to ruining my experience of it. I guess I'm just a little spoiled?

<p>BTW: I've been really busy lately. Lot's to catch up on after summer holidays, <a href="http://www.flashmagazine.com/community/detail/flash_on_the_beach_2009_day_1/">FOTB</a>, all the <a href="http://www.flashmagazine.com/news/detail/new_beta_releases_on_adobe_labs/">MAX announcements</a> (as the <a href="http://www.flashmagazine.com/news/detail/flash_for_the_iphone/">iPhone</a> one) and client work. I'll also go to Sydney to visit my brother next week so it's been a while since last post. Will probably be so a while ahead as well. So much to do and so much fun ahead!</p>]]></description>
         <link>http://www.flashgamer.com/2009/10/fdt_quick_tips_for_flash_playe.html</link>
         <guid>http://www.flashgamer.com/2009/10/fdt_quick_tips_for_flash_playe.html</guid>
         <category>Flash</category>
         <pubDate>Wed, 14 Oct 2009 22:42:56 +0100</pubDate>
      </item>
            <item>
         <title>Please smooth your video site!</title>
         <description><![CDATA[<p>Lately there's been several great websites that are based on video. <a href="http://www.wechoosethemoon.org/">We Choose The Moon</a> and <a href="http://www.campanhainstantanea.com/">Instant Campaign</a> are two of them. Both these sites must have cost thousands of dollars to make, but the video looks quite pixelated. It's actually so pixelated that it annoys me, especially since it's so easy to fix. Have a look at the picture below.</p>

<p><img alt="smoothing.jpg" src="http://www.flashgamer.com/img/smoothing.jpg" width="500" height="376" /></p>

<p>Common for both of these sites is that they scale the content to the width of the browser. If you view any of these sites on a big screen such as the Apple 30", this looks extremely bad and all you need to fix it is one simple line of code:</p>

<pre>video.smoothing = true;</pre>

<p>That's it and your video will look much better on big screens. Doing this adds a little to the CPU usage, but this won't matter much on the average machine.</p>

<p>I've also uploaded an <a href="http://www.flashgamer.com/a/smooth.fla">example FLA</a> that you can have a look at to test this. Just run the file to load play video. Scale the SWF and click the video to toggle smoothing on/off.</p>

<p>PS: sorry about the lack of updates recently. I've been on holidays and been quite busy with client work lately. Finally having a little free time now to experiment and play! :)</p>

<p><br />
</p>]]></description>
         <link>http://www.flashgamer.com/2009/08/please_smooth_your_video_site.html</link>
         <guid>http://www.flashgamer.com/2009/08/please_smooth_your_video_site.html</guid>
         <category>Flash</category>
         <pubDate>Sun, 30 Aug 2009 21:53:24 +0100</pubDate>
      </item>
            <item>
         <title>What did I do the last year</title>
         <description><![CDATA[<p>I just delivered yet another <a href="http://away3d.com">Away3D</a> project for a longtime client of mine - dna shoes. It's a <a href="http://www.dna-shoes.com/converse/">nice competition for Converse shoes</a> that use MMS and email to build a nice 3D gallery (based on one of my workshop files). I've done lot's of Flash 3D this year and it's actually become my main income the last 12 months.</p>

<p>For many years, I've used Blinksale for my billing purposes. It's a very basic service, but it does have one neat feature and that's tagging. By selecting invoices by tags, I can easily see what I spent my time on and Flash 3D is a BIG part of it. This chart shows what kind of projects I've billed the last 12 months:<br />
<img alt="whatdidIdo.png" src="http://www.flashgamer.com/img/whatdidIdo.png" width="510" height="469" /><br />
This is just my commercial work and in addition I've also done many personal projects. Most of these include Away3D in some way so if anyone ever wondered if it's possible to make money from Open Source Flash - here's another little bit of proof. Thanks to the entire <a href="http://away3d.com/team">Away3D team</a> for filling my days (and nights) with fun!</p>

<p>PS: The 6% training is also Away3D! :-D</p>]]></description>
         <link>http://www.flashgamer.com/2009/05/what_did_i_do_the_last_year.html</link>
         <guid>http://www.flashgamer.com/2009/05/what_did_i_do_the_last_year.html</guid>
         <category>About</category>
         <pubDate>Tue, 26 May 2009 11:06:23 +0100</pubDate>
      </item>
            <item>
         <title>Realtime 3D on the web - a toy or a useful tool?</title>
         <description><![CDATA[<p>A little late, but here's the slides from my presentation at the FlashForum Konference in Cologne. In the session, I discussed 3D on the web and what it's good for. I started with a historical overview for we've had 3D on the web for a long time already. It's never been a success though and I highlighted some possible reasons as well as why Flash changes this. I also tried to draw up some rules for what constitutes "good use of 3D on the web". Is showed no code at all in the presentation and the slides don't give away all I said, but you'll get the idea.</p>

<p><em><a href="http://www.flashgamer.com/workshop/Realtime3D.pdf">PDF of presentation</a></em></p>

<p>I've done lots of presentations before, but this was the first time I presented at an international conference in English. I was super-nervous but the session went really well and I got some good feedback. It kind of surprised me how little feedback you get initially. Just a few mentions on Twitter that said my session was "nice" - not all that encouraging. Later I got the feedback from the Feedback forms as well as blog articles such as <a href="http://www.phihochzwei.com/wordpress/?p=143">this one</a> that said "Fantastischer Vortrag und super Redner". Really strange to not just give feedback like I usually do on Flashmagazine, but also receive it! :D</p>

<p><a href="http://www.flickr.com/photos/marcthiele/sets/72157617138722781/"><img alt="jensaAtFfk09.jpg" src="http://www.flashgamer.com/img/jensaAtFfk09.jpg" width="500" height="333" /></a><br />
<em>Photo by Marc Thiele/FFK</em></p>

<p>The day before the conference, I also did a full-day Away3D workshop. Renowned community expert Peter Elst was there and <a href="http://www.peterelst.com/blog/2009/04/27/discovered-the-third-dimension-at-ffk09/">I'm glad he enjoyed it</a>! I also did <a href="http://www.flashmagazine.com/community/detail/ffk09_day_1/">two</a> <a href="http://www.flashmagazine.com/community/detail/ffk09_day_2/">reports</a> from the event for Flashmagazine.</p>

<p>I have to congratulate Marc and Sascha - they really know how to pull off such an event! The mood was excellent. 500 attendees, 28 sessions, 10 workshops and not a glitch. Pretty neat and all served at a fraction of the cost of other conferences? Pretty impressive if you ask me! I had a great time!</p>]]></description>
         <link>http://www.flashgamer.com/2009/05/realtime_3d_on_the_web_a_toy_o.html</link>
         <guid>http://www.flashgamer.com/2009/05/realtime_3d_on_the_web_a_toy_o.html</guid>
         <category>Flash</category>
         <pubDate>Fri, 22 May 2009 00:35:26 +0100</pubDate>
      </item>
            <item>
         <title>AIR window resize inconsistencies</title>
         <description><![CDATA[<p>The last two weeks I've been working on 3 different AIR apps and I have to say I really like Adobe AIR. It's easy to develop for and quite consistent across the various Operating Systems. One thing that had me (and others) puzzled is how the windowing system works, so I thought I'd add a post for future reference.</p>

<p>There's two main ways you control the appearance of the main application window. One is by setting properties on the mx:WindowedApplication tag and the other is to set properties in the application.xml file that defines each AIR app.</p>

<h2>Resizing</h2>
The application.xml has a xml property that controls the resizing of your app:
<code><pre class="brush: actionscript;">
&lt;!-- Whether the user can resize the window. Optional. Default true. --&gt;
&lt;resizable&gt;false&lt;/resizable&gt;
</pre></code>
So to prevent resizing, you just set this parameter to false, right? Not right. You will notice that the "gripper" is still present in the lower, right corner of your app and this allows rescaling. To turn off the gripper, just add showGripper="false" to your WindowedApplication tag and that's it. Or is it? Of course not. To make this work with the system chrome, you'll actually have to turn off the Maximize button as well, making the complete settings like this:
<code><pre class="brush: actionscript;">
&lt;!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. --&gt;
&lt;systemChrome&gt;standard&lt;/systemChrome&gt;
&lt;!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. --&gt;
&lt;transparent&gt;false&lt;/transparent&gt;
&lt;!-- Whether the window is initially visible. Optional. Default false. --&gt;
&lt;!-- &lt;visible&gt;&lt;/visible&gt; --&gt;
&lt;!-- Whether the user can minimize the window. Optional. Default true. --&gt;
&lt;!-- &lt;minimizable&gt;false&lt;/minimizable&gt; --&gt;
&lt;!-- Whether the user can maximize the window. Optional. Default true. --&gt;
&lt;maximizable&gt;false&lt;/maximizable&gt;
&lt;!-- Whether the user can resize the window. Optional. Default true. --&gt;
&lt;resizable&gt;false&lt;/resizable&gt;
</pre></code>

<p>The other option is to not use the operating system's windowing style, but rather the standard one that AIR provides. <br />
<code><pre class="brush: actionscript;"><br />
&lt;!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. --&gt;<br />
&lt;systemChrome&gt;none&lt;/systemChrome&gt;<br />
&lt;!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. --&gt;<br />
&lt;transparent&gt;true&lt;transparent&gt;<br />
</pre></code><br />
These settings will automatically hone the <resizable> setting specified in the XML, so the window can't be resized. You'll still see the "gripper", but it won't have any effect and you can easily turn it off.</p>

<h2>The Fullscreen bug</h2>
Another, slightly related thing you should be aware of is that there's a bug relating to using standard window chrome and setting the <minimizable> / <maximizable> properties in the application.xml. If you turn off these properties, they will be grayed out (disabled). Once you set the app to FullScreen mode and return from it, the maximize/minimize buttons are now incorrectly set as enabled allowing the user to set them. Only workaround I know of is to loose the OS native window chrome.

<p>It would be great if this was cleaned up and made more consistent for the next iteration of the AIR runtime. If I turn off the gripper, I want it to disappear (no matter what) and if I set resizable to false, I actually don't want it to be possible to resize the app, no matter what.</p>

<p>I'd also love to be able set properties such as "Application.application.maximizable" at runtime so I don't need the XML file at all. It's really just annoying and messing up my development process.</p>

<p><em>Note: This post applies to AIR 1.5. I'm not sure, but I think this applies to NativeWindows as well.</em><br />
<img alt="airLogo.jpg" src="http://www.flashgamer.com/img/airLogo.jpg" width="500" height="264" /></p>]]></description>
         <link>http://www.flashgamer.com/2009/05/air_window_inconsistencies.html</link>
         <guid>http://www.flashgamer.com/2009/05/air_window_inconsistencies.html</guid>
         <category>Flash</category>
         <pubDate>Thu, 14 May 2009 14:38:16 +0100</pubDate>
      </item>
      
   </channel>
</rss>
