<?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>franto.com &#187; AIR Tips</title>
	<atom:link href="http://franto.com/tag/air-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://franto.com</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 19:38:06 +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>Fastest way of closing AIR application</title>
		<link>http://franto.com/fastest-way-of-closing-air-application/</link>
		<comments>http://franto.com/fastest-way-of-closing-air-application/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 10:03:12 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AIR Tips]]></category>
		<category><![CDATA[Feedback]]></category>

		<guid isPermaLink="false">http://www.franto.com/?p=932</guid>
		<description><![CDATA[In my appliaction, The code: "application.close();" is used to exit
the application. And I found, no. of ways are there to exit the application. Let me
know, which one is best , should allow the grace full exit and should faster.

No. of ways to Exit in Flex:

       1. NativeApplication.nativeApplication.exit();
       2. Application.application.exit();
       3. application.close();
       4. exit();

       And please advise, any other option is there to exit the application.]]></description>
			<content:encoded><![CDATA[<div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/fastest-way-of-closing-air-application/" data-text="Fastest way of closing AIR application"data-count="vertical" data-lang="en" data-related="AIR,AIR+Tips,Feedback""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>Today on <a href="http://code.google.com/p/flexlib/">FlexLib</a> mailinglist I&#8217;ve found quite nice and interesting question:</p>
<blockquote><p>Dear Folks,</p>
<p>       In my appliaction, The code: &#8220;application.close();&#8221; is used to exit<br />
the application.<br />
And I found, no. of ways are there to exit the application. Let me<br />
know, which one is best , should allow the<br />
grace full exit and should faster.</p>
<p> No. of ways to Exit in Flex:</p>
<p>       1. NativeApplication.nativeApplication.exit();<br />
       2. Application.application.exit();<br />
       3. application.close();<br />
       4. exit();</p>
<p>       And please advise, any other option is there to exit the application.</p>
<p>Thanks in Advance</p>
<p>Lokh</p></blockquote>
<p>What are your experiences with closing AIR application. Do you think it&#8217;s matters on function which is  closing AIR application?</p>
<p>Post your thoughts and I will post them to the FlexLib mailinglist.</p>
<p>Thank you</p>
]]></content:encoded>
			<wfw:commentRss>http://franto.com/fastest-way-of-closing-air-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen</title>
		<link>http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/</link>
		<comments>http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 21:48:24 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[AIR Tips]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.franto.com/?p=856</guid>
		<description><![CDATA[This is long title, but it can tells everything. I came up interesting issue. I do not know if you have already played with new AIR 1.5. We need some new features, so we have used it. And found interesting issue. If you are using HTML compoment and want to load HTML pages with Flash [...]]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for air-tip</h3><ol><li><a href='http://franto.com/airtips-problem-with-appxml-in-flex-3/' title='AirTip: Problem with app.xml in Flex 3'>AirTip: Problem with app.xml in Flex 3</a></li><li><a href='http://franto.com/airtip-air-application-gained-focus/' title='AirTip: AIR application gained focus'>AirTip: AIR application gained focus</a></li><li><a href='http://franto.com/airtip-list-all-of-your-drives-in-air-application/' title='AirTip: List all of your drives in AIR application'>AirTip: List all of your drives in AIR application</a></li><li><a href='http://franto.com/adobe-air-15-available-in-flex-sdk-nightly-builds/' title='Adobe AIR 1.5 available in Flex SDK Nightly builds'>Adobe AIR 1.5 available in Flex SDK Nightly builds</a></li><li><a href='http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/' title='AIR Tip: ContextMenuItem can crash AIR app on Windows'>AIR Tip: ContextMenuItem can crash AIR app on Windows</a></li><li>AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen</li></ol></div> <div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/" data-text="AIR Tip: Flash movie is not rendered in AIR 1.5 HTML%2520in Fullscreen"data-count="vertical" data-lang="en" data-related="AIR,AIR+Tips""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>This is long title, but it can tells everything. I came up interesting issue. I do not know if you have already played with new <a href="http://get.adobe.com/air/">AIR 1.5</a>. We need some new features, so we have used it. And found interesting issue. If you are using HTML compoment and want to load HTML pages with Flash content inside it works in normal mode. But if your application is in Fullscreen, Flash movies are not loaded. In context menu (right click) there is just written Movie is not loaded&#8230; If i press Esc and go away from Fullscreen mode, Flash is loaded and all works correctly. Hmmm, strange. Does anyone experience same problem? Can someone from Adobe tell me anything about this.</p>
<p>Sorry, if I can&#8217;t see anything obvious&#8230;</p>
<p>I hope this will help to anyone&#8230;</p>
<p>If you are interested in similar Flex / AIR / Flash Tips &amp; Tricks, consider subscribe to my <a rel="nofollow" href="http://www.franto.com/frantocom-tips-tricks">Franto.com Tips &amp; Tricks</a>.</p>
<h3 style="color:#ff0000">ATTENTION!</h3>
<p>Tyler pointed me to the <a href="http://www.rogue-development.com/blog2/">Marc&#8217;s Musings Blog</a>, where Marc Hughes has experienced same problems, and it is confirmed by Adobe AIR Engineers, that this is <a href="https://bugs.adobe.com/jira/browse/SDK-18152">bug</a>. It&#8217;s already submitted in <a href="https://bugs.adobe.com/jira/browse/SDK-18152">Adobe Bug tracking system</a>.</p>
<p>Here are Marc&#8217;s posts:</p>
<ul>
<li><a href="http://www.rogue-development.com/blog2/2008/11/air-full-screen-hosted-swf-content-in-html-control/">AIR Full screen &amp; hosted swf content in HTML control</a></li>
<li><a href="http://www.rogue-development.com/blog2/2008/11/apollocoders-full-screen-html/">Confirmation from Adobe AIR Engineers, that&#8217;s the bug</a></li>
</ul>
 <div class='series_links'><a href='http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/' title='AIR Tip: ContextMenuItem can crash AIR app on Windows'>Previous in series</a> </div>]]></content:encoded>
			<wfw:commentRss>http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AIR Tip: ContextMenuItem can crash AIR app on Windows</title>
		<link>http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/</link>
		<comments>http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 11:34:24 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[AIR Tips]]></category>
		<category><![CDATA[Flash Tips & Tricks]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[ContextMenu]]></category>

		<guid isPermaLink="false">http://www.franto.com/?p=768</guid>
		<description><![CDATA[This is just quick tip for all AIR developers. If you are developing AIR application and you want to use ContextMenu please be aware of possible problem on Windows platform. This is not problem on Mac, and it's not problem in Flash Player (even on Windows). It is problem just in AIR on Windows]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for air-tip</h3><ol><li><a href='http://franto.com/airtips-problem-with-appxml-in-flex-3/' title='AirTip: Problem with app.xml in Flex 3'>AirTip: Problem with app.xml in Flex 3</a></li><li><a href='http://franto.com/airtip-air-application-gained-focus/' title='AirTip: AIR application gained focus'>AirTip: AIR application gained focus</a></li><li><a href='http://franto.com/airtip-list-all-of-your-drives-in-air-application/' title='AirTip: List all of your drives in AIR application'>AirTip: List all of your drives in AIR application</a></li><li><a href='http://franto.com/adobe-air-15-available-in-flex-sdk-nightly-builds/' title='Adobe AIR 1.5 available in Flex SDK Nightly builds'>Adobe AIR 1.5 available in Flex SDK Nightly builds</a></li><li>AIR Tip: ContextMenuItem can crash AIR app on Windows</li><li><a href='http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/' title='AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen'>AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen</a></li></ol></div> <div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/" data-text="AIR Tip: ContextMenuItem can crash AIR app on Windows"data-count="vertical" data-lang="en" data-related="AIR,AIR+Tips,ContextMenu""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>This is just quick tip for all AIR developers. If you are developing AIR application and you want to use ContextMenu please be aware of possible problem on Windows platform. This is not problem on Mac, and it&#8217;s not problem in Flash Player (even on Windows). It is problem just in AIR on Windows (at least what I have find out till now).</p>
<p>Problem is as follow:</p>
<p>You want to have ContextMenu for some of your item (right click menu). You have created ContextMenu and want to add ContextMenuItem in this way</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> myItem<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuItem</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenuItem</span><span style="color: #000000;">&#40;</span>myItemName<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>if variable myItemName is initialized or at least is empty string, all is ok. But there can situations when it is null. For example when you want to support multilanguage with ResourceManager, so it&#8217;s not correctly fill up and it&#8217;s null. In that case you AIR will crash and you will not know why, because it&#8217;s works on Mac, it works in FlashPlayer (without AIR), it just doesn work in AIR on Windows platform</p>
<p>So my quick fix was create fix function, like this</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> fixEmptyString<span style="color: #000000;">&#40;</span>val<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>val == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span>
		<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #990000;">''</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">return</span> val<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> myItem<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">ContextMenuItem</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">ContextMenuItem</span><span style="color: #000000;">&#40;</span>fixEmptyString<span style="color: #000000;">&#40;</span>myItemName<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>This will for sure.</p>
<p>Hope this helps you.</p>
<p><strong>P.S.</strong> I will post this and another useful AIR tips in my <strong><a title="Franto.com Tips &amp; Tricks, useful Flex, AIR, Flash, ActionScript Tips &amp; Tricks" href="http://www.franto.com/frantocom-tips-tricks">Franto.com Tips &amp; Tricks</a></strong>, so do not wait and subscribe to my list, if you find AIR tip this useful&#8230;</p>
 <div class='series_links'><a href='http://franto.com/adobe-air-15-available-in-flex-sdk-nightly-builds/' title='Adobe AIR 1.5 available in Flex SDK Nightly builds'>Previous in series</a> <a href='http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/' title='AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen'>Next in series</a></div>]]></content:encoded>
			<wfw:commentRss>http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AirTip: Problem with app.xml in Flex 3</title>
		<link>http://franto.com/airtips-problem-with-appxml-in-flex-3/</link>
		<comments>http://franto.com/airtips-problem-with-appxml-in-flex-3/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 21:21:34 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[AIR Tips]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.franto.com/blog2/airtips-problem-with-appxml-in-flex-3</guid>
		<description><![CDATA[So this is first tip for AIR development (See my FlexTips). I came across bug in Flex 3 Beta. It&#8217;s strange. I was playing with App-app.xml file to try change chrome and transparency. &#160; If you have systemChrome=&#8221;standard&#8221;, transparency must be set to false, if you have systemChrome=&#8221;none&#8221;, you can set transparency to true. And [...]]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for air-tip</h3><ol><li>AirTip: Problem with app.xml in Flex 3</li><li><a href='http://franto.com/airtip-air-application-gained-focus/' title='AirTip: AIR application gained focus'>AirTip: AIR application gained focus</a></li><li><a href='http://franto.com/airtip-list-all-of-your-drives-in-air-application/' title='AirTip: List all of your drives in AIR application'>AirTip: List all of your drives in AIR application</a></li><li><a href='http://franto.com/adobe-air-15-available-in-flex-sdk-nightly-builds/' title='Adobe AIR 1.5 available in Flex SDK Nightly builds'>Adobe AIR 1.5 available in Flex SDK Nightly builds</a></li><li><a href='http://franto.com/air-tip-contextmenuitem-can-crash-air-app-on-windows/' title='AIR Tip: ContextMenuItem can crash AIR app on Windows'>AIR Tip: ContextMenuItem can crash AIR app on Windows</a></li><li><a href='http://franto.com/air-tip-flash-movie-is-not-rendered-in-air-15-html-in-fullscreen/' title='AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen'>AIR Tip: Flash movie is not rendered in AIR 1.5 HTML  in Fullscreen</a></li></ol></div> <div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/airtips-problem-with-appxml-in-flex-3/" data-text="AirTip: Problem with app.xml in Flex 3"data-count="vertical" data-lang="en" data-related="AIR,AIR+Tips""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>So this is first tip for AIR development (See my FlexTips). I came across bug in Flex 3 Beta. It&#8217;s strange. I was playing with App-app.xml file to try change chrome and transparency.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">&nbsp;</pre></div></div>

<p>If you have systemChrome=&#8221;standard&#8221;, transparency must be set to false, if you have systemChrome=&#8221;none&#8221;, you can set transparency  to true. And now problem. Try to set systemChrome=&#8221;standard&#8221; but have transparent=&#8221;true&#8221;. After compiling there is error: <span style="color:red"><strong>&#8220;Unknown error generating output application.xml files&#8221;</strong></span>. You can set systemChrome and transparent parameters back to correct values, you will not get rid of this error. After surfing I have find, that there is because of <a href="http://sdc.shockwave.com/cfusion/webforums/forum/messageview.cfm?forumid=72&amp;catid=641&amp;threadid=1277512&amp;enterthread=y">some invisible chars in the app.xml file</a>. I was trying to remove them, but I can&#8217;t see any invisible chars. I have tried to delete file, and copy another working app.xml from working AIR project. Nothing.</p>
<p>The only way how I clear the error was by creating new AIR project, and copy all files from old project except app.xml. I use the new one.</p>
<p>Hope this help someone.</p>
<p><strong>May this will help you:</strong><br />
I wanted to delete this project, and in bin folder there were app.xml which was used by Windows and can be delete, and there were wrong line:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">&nbsp;</pre></div></div>

<p>So it seems, when you will have this error in your project, you have to delete or fix file in bin directory, not in source directory.<br />
And when I wanted to switch off the computer, there were process which can be killed (flex 3), so I have to reset the computer.</p>
<p>This should help</p>
 <div class='series_links'> <a href='http://franto.com/airtip-air-application-gained-focus/' title='AirTip: AIR application gained focus'>Next in series</a></div>]]></content:encoded>
			<wfw:commentRss>http://franto.com/airtips-problem-with-appxml-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

