<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Scott Mebberson &#187; air</title>
	<atom:link href="http://scottmebberson.wordpress.com/category/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://scottmebberson.wordpress.com</link>
	<description>Web Technologist</description>
	<lastBuildDate>Fri, 19 Nov 2010 08:19:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='scottmebberson.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Scott Mebberson &#187; air</title>
		<link>http://scottmebberson.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://scottmebberson.wordpress.com/osd.xml" title="Scott Mebberson" />
	<atom:link rel='hub' href='http://scottmebberson.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Multiple screens in AIR</title>
		<link>http://scottmebberson.wordpress.com/2009/07/14/multiple-screens-in-air/</link>
		<comments>http://scottmebberson.wordpress.com/2009/07/14/multiple-screens-in-air/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 01:17:11 +0000</pubDate>
		<dc:creator>Scott Mebberson</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://scottmebberson.wordpress.com/?p=127</guid>
		<description><![CDATA[A user of Focus Booster sent through an interesting request, which is to make Focus Booster restore the window position upon subsequent loads. I can&#8217;t believe I hadn&#8217;t thought of that, and have now added it to my list of required standard functionality for AIR applications. So, I set out to implement this feature and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scottmebberson.wordpress.com&amp;blog=1083980&amp;post=127&amp;subd=scottmebberson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A user of <a href="http://www.focusboosterapp.com/">Focus Booster</a> sent through an interesting request, which is to make <a href="http://www.focusboosterapp.com/">Focus Booster</a> restore the window position upon subsequent loads. I can&#8217;t believe I hadn&#8217;t thought of that, and have now added it to my list of required standard functionality for AIR applications.</p>
<p>So, I set out to implement this feature and got to thinking about multi-screen support. Everything screen related takes place in the flash.display.Screen class. I thought there might be a simple method or property to return the current screen index a particular nativeWindow is on; but there isn&#8217;t really anything quite that useful there.</p>
<p>The closest thing you can get is Screen.screens which is an array containing individual Screen objects, one for each screen plugged into the viewing computer. From there, you have to implement your own routines to determine which screen a nativeWindow is on.</p>
<p>I wrote up a quick example that demonstrates how to determine which screen the window is on, and also how to store the window position and restore it next time the application is loaded. <a href="http://www.box.net/shared/eqz4gqhiii">It&#8217;s called TwoScreens, and you can right-click to view the source (once you&#8217;ve unzipped the AIR file and installed it)</a>.</p>
<p>There may be a better way to do this, so post a comment if you know better ways to achieve this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scottmebberson.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/scottmebberson.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/scottmebberson.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/scottmebberson.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/scottmebberson.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/scottmebberson.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/scottmebberson.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/scottmebberson.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scottmebberson.wordpress.com&amp;blog=1083980&amp;post=127&amp;subd=scottmebberson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scottmebberson.wordpress.com/2009/07/14/multiple-screens-in-air/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7a8378aa8040faec725a250cfc4c6f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mebbo</media:title>
		</media:content>
	</item>
		<item>
		<title>Dispatching events in Adobe AIR using MATE</title>
		<link>http://scottmebberson.wordpress.com/2009/05/27/dispatching-events-in-adobe-air-using-mate/</link>
		<comments>http://scottmebberson.wordpress.com/2009/05/27/dispatching-events-in-adobe-air-using-mate/#comments</comments>
		<pubDate>Wed, 27 May 2009 13:10:41 +0000</pubDate>
		<dc:creator>Scott Mebberson</dc:creator>
				<category><![CDATA[air]]></category>
		<category><![CDATA[flash platform]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[mate]]></category>

		<guid isPermaLink="false">http://blog.scottmebberson.com/?p=114</guid>
		<description><![CDATA[I&#8217;ve been intrigued about the Flex framework called MATE ever since I stumbled across it, some months ago. The guys at asfusion.com have always been expert Flex / ActionScript developers and the MATE framework they&#8217;ve developed is no exception. I decided to use MATE rather than Cairngorm in a personal project I&#8217;m working on, to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scottmebberson.wordpress.com&amp;blog=1083980&amp;post=114&amp;subd=scottmebberson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been intrigued about the Flex framework called MATE ever since I stumbled across it, some months ago. The guys at asfusion.com have always been expert Flex / ActionScript developers and the MATE framework they&#8217;ve developed is no exception.</p>
<p>I decided to use MATE rather than Cairngorm in a personal project I&#8217;m working on, to check it out in a real world environment (there&#8217;s nothing like going beyond examples and prototypes to determine if a framework actually works beyond design patterns and theory).</p>
<p>So far, I&#8217;m very impressed.</p>
<p>It&#8217;s light weight, easy to integrate, and has a tag to suit almost any situation and many common design patterns. Within half an hour, I had MATE integrated into my project, dispatching events and updating the model.</p>
<p>I did however come across an interesting problem which had me stumped for a while. I&#8217;m working on an AIR application in which I have a preferences window (via a NativeWindow popup) which creates, stores and modifies preferences for the application (yes, I&#8217;m using <a title="as3preferenceslib on Google Code" href="http://code.google.com/p/as3preferenceslib/" target="_blank">as3preferenceslib</a>).</p>
<p>The basic idea behind MATE is to dispatch events and respond to those with changes to the Model using dependency injection to keep your views notified of the changes. All of this happens via a tag called EventMap (MATE is a tag-based framework) which is used to respond to events, change the model and inject changes to data into views. Basically, you whack the EventMap tag into your Application.mxml, use the standard dispatchEvent and magically, everything works.</p>
<p>Unless you&#8217;re view is used in a popup window and you want to use MATE events and the model.</p>
<p>The reason being popup windows within AIR have an entirely different displayList to the Application displayList and your EventMap won&#8217;t be able to intercept events dispatched using the standard disptachEvent.</p>
<p>After some poking around in the MATE documentation (which is very good by the way) I found a Dispatch tag, which can also be instantiated via ActionScript. So, I simply made an instance of Dispatch and used the dispatchEvent method and once again, magically, everything worked.</p>
<p><pre class="brush: jscript;">
var countdownEvent : CountdownEvent = new CountdownEvent(CountdownEvent.SET);
countdownEvent.countdown = event.newValue;

var d : Dispatcher = new Dispatcher();
d.dispatchEvent(countdownEvent);
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scottmebberson.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/scottmebberson.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/scottmebberson.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/scottmebberson.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/scottmebberson.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/scottmebberson.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/scottmebberson.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/scottmebberson.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scottmebberson.wordpress.com&amp;blog=1083980&amp;post=114&amp;subd=scottmebberson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scottmebberson.wordpress.com/2009/05/27/dispatching-events-in-adobe-air-using-mate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f7a8378aa8040faec725a250cfc4c6f5?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Mebbo</media:title>
		</media:content>
	</item>
	</channel>
</rss>
