<?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>The Space For App Developers &#187; Releases</title>
	<atom:link href="http://www.riaspace.com/category/releases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.riaspace.com</link>
	<description>Beyond Plain Old HTML Objects</description>
	<lastBuildDate>Mon, 30 Jan 2012 10:51:52 +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>Flex 4.6 &#8211; BlueChips demo</title>
		<link>http://www.riaspace.com/2011/12/flex-4-6-bluechips-demo/</link>
		<comments>http://www.riaspace.com/2011/12/flex-4-6-bluechips-demo/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 19:32:19 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Recording]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[BlueChips]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=3384</guid>
		<description><![CDATA[To celebrate the best ever release of Flex SDK marked with 4.6 version number I decided to publish source code of my little tablet demo app called BlueChips. The video below demonstrates BlueChips in action together with an overview of new Flex 4.6 components that target tablet development. You can go ahead and download the [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F12%2Fflex-4-6-bluechips-demo%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F12%2Fflex-4-6-bluechips-demo%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>To celebrate the best ever release of <strong>Flex SDK</strong> marked with <strong>4.6</strong> version number I decided to publish source code of my little tablet demo app called <strong>BlueChips</strong>. The video below demonstrates BlueChips in action together with an overview of new Flex 4.6 components that target tablet development. You can go ahead and download the source code from <a href="https://github.com/pwalczyszyn/BlueChips" target="_blank">github</a> and do whatever you want with it <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><center><br />
<iframe title="YouTube video player" class="youtube-player" type="text/html" width="640" height="360" src="http://www.youtube.com/embed/TvEpJuU74Kg" frameborder="0" allowFullScreen="true"> </iframe><br />
</center></p>
<p>If you prefer vimeo over youtube you can watch the same recording <a href="http://vimeo.com/32982854" target="_blank">here</a>.</p>
<div class="shr-publisher-3384"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F12%2Fflex-4-6-bluechips-demo%2F' data-shr_title='Flex+4.6+-+BlueChips+demo'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F12%2Fflex-4-6-bluechips-demo%2F' data-shr_title='Flex+4.6+-+BlueChips+demo'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/12/flex-4-6-bluechips-demo/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Bundling AIR 3 runtime in AIR desktop applications</title>
		<link>http://www.riaspace.com/2011/08/bundling-air-3-runtime-in-air-desktop-applications/</link>
		<comments>http://www.riaspace.com/2011/08/bundling-air-3-runtime-in-air-desktop-applications/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 15:49:35 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AIR]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=3290</guid>
		<description><![CDATA[At the beginning of this week a beta 2 version of the AIR 3 SDK was released. The AIR 3 SDK and AIR 3 runtime will be a major release that will bring a lot of really cool features. One of the features that I’m really excited about is Captive Runtime, which lets you package your [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F08%2Fbundling-air-3-runtime-in-air-desktop-applications%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F08%2Fbundling-air-3-runtime-in-air-desktop-applications%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://www.riaspace.com/wp-content/uploads/2011/08/air_165x165.jpg"><img class="alignleft size-full wp-image-3300" style="border-style: initial; border-color: initial; margin-left: 10px; margin-right: 10px; border-width: 0px;" title="air_165x165" src="http://www.riaspace.com/wp-content/uploads/2011/08/air_165x165.jpg" alt="" width="165" height="165" /></a>At the beginning of this week a <strong>beta 2</strong> version of the <a href="http://labs.adobe.com/downloads/air3.html" target="_blank">AIR 3 SDK</a> was released. The AIR 3 SDK and AIR 3 runtime will be a major release that will bring a lot of really cool features. One of the features that I’m really excited about is <strong>Captive Runtime</strong>, which lets you package your applications with a bundled AIR runtime. This is something that was available for the iOS platform from day one, and now it is also supported for both Android devices and desktops.</p>
<p>I think this is a really important feature for AIR. I heard many times from our customers and the community that we need a solution that enables users to install AIR applications without administrator rights. This is a common scenario especially in the enterprise environments where users don’t have full privileges. Also in some other cases it may improve user experience as there is no need to ask the user to install an additional runtime. It will also help when you need to distribute your application on a CD or other media that doesn’t let you use the browser-based badge installer.</p>
<p>Now how do you package your app for both Windows and Mac? It&#8217;s really simple. First thing what you need to do is to download and unzip the new SDK from <a href="http://labs.adobe.com" target="_blank">Adobe Labs</a>. Next compile your application either with the command line mxmlc compiler or using Flash Builder. To do it in Flash Builder, right-click your AIR application project, select Export&#8230; -&gt; Flash Builder -&gt; Release Build, and complete just the first step of this wizard without finishing it. This will create a bin-release-temp folder under your project directory with a compiled SWF and app descriptor file. Now go to the command line and invoke following adt command from your project/bin-release-temp folder.</p>
<h4>On Windows:</h4>
<p><code>c:\path\to\air3sdk\bin\adt.bat -package -storetype pkcs12 -keystore c:\path\to\certificate.p12 -target bundle myapp.exe myapp-app.xml -C . myapp.swf<br />
</code></p>
<h4>On Mac:</h4>
<p><code>/path/to/air3sdk/bin/adt -package -storetype pkcs12 -keystore /path/to/certificate.p12 -target bundle myapp.app myapp-app.xml -C . myapp.swf<br />
</code></p>
<p>You will receive slightly different results depending on your platform. On Mac your application is packaged into myapp.app, which is a single Mac package file. You can just double-click it to run the app. Also if you want to introspect its content you can right-click it and select the Show Package Contents option. On Windows you will get myapp.exe folder that has all the runtime files and the executable myapp.exe file in it. Now you can use your favorite installer builder to build a setup package for your application.</p>
<h4>Generated folders structure on Windows:</h4>
<p><a href="http://www.riaspace.com/wp-content/uploads/2011/08/captive-win.png"><img class="size-full wp-image-3312 alignnone" style="border-style: initial; border-color: initial; border-width: 0px;" title="captive-win" src="http://www.riaspace.com/wp-content/uploads/2011/08/captive-win.png" alt="" width="334" height="180" /></a></p>
<h4>Generated package structure on Mac:</h4>
<p><a href="http://www.riaspace.com/wp-content/uploads/2011/08/captive-mac.png"><img class="size-full wp-image-3313 alignnone" style="border-style: initial; border-color: initial; border-width: 0px;" title="captive-mac" src="http://www.riaspace.com/wp-content/uploads/2011/08/captive-mac.png" alt="" width="327" height="229" /></a></p>
<p>For Android options check out this blog <a href="http://www.tricedesigns.com/2011/08/10/air-3-0-captive-runtime/" target="_blank">post</a> by my new fellow evangelist Andy Trice.</p>
<div class="shr-publisher-3290"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F08%2Fbundling-air-3-runtime-in-air-desktop-applications%2F' data-shr_title='Bundling+AIR+3+runtime+in+AIR+desktop+applications'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F08%2Fbundling-air-3-runtime-in-air-desktop-applications%2F' data-shr_title='Bundling+AIR+3+runtime+in+AIR+desktop+applications'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/08/bundling-air-3-runtime-in-air-desktop-applications/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>as3viewnavigator 2.0.0 RC1 released!</title>
		<link>http://www.riaspace.com/2011/03/as3viewnavigator-2-0-0-rc1-released/</link>
		<comments>http://www.riaspace.com/2011/03/as3viewnavigator-2-0-0-rc1-released/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 16:01:05 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[as3viewnavigator]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2593</guid>
		<description><![CDATA[I&#8217;m proud to announce a new release of the as3viewnavigator library. This new release is labeled with a 2.0.0 RC1 version number. Since the previous release the source code has been almost entirely rewritten to provide a host of new features, many bug-fixes and increased extensibility. The changes have likely also introduced some new bugs, [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F03%2Fas3viewnavigator-2-0-0-rc1-released%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F03%2Fas3viewnavigator-2-0-0-rc1-released%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>I&#8217;m proud to announce a new release of the <strong><a href="https://github.com/pwalczyszyn/as3viewnavigator">as3viewnavigator</a></strong> library. This new release is labeled with a 2.0.0 RC1 version number. Since the previous release the source code has been almost entirely rewritten to provide a host of new features, many bug-fixes and increased extensibility. The changes have likely also introduced some new bugs, so that is why this is an RC1 (Release Candidate 1) even though I think it is feature complete. Before it goes final I want to test it myself in battle and also have others provide input and bug reports. If you used previous versions I&#8217;m certain it will break your existing code (for your reference, the previous version is still available in github under the <a href="https://github.com/pwalczyszyn/as3viewnavigator/tree/as3viewnavigator-1.0.0">1.0.0 tag</a>.</p>
<p><strong>So what is new:</strong></p>
<ul>
<li>You can use <code>ViewNavigator</code> for Flex (desktop) projects! At least until ViewNavigator from Flex Hero will not be available for desktop projects <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li><code>ViewNavigator</code> has become a container (based on the Sprite class for AS3 projects and the <code>UIComponent</code> for Flex) now. Its default behavior in AS3 projects when added to the stage is that it takes 100% of the stage area and it auto-resizes itself. You also have an option to control <code>ViewNavigator</code> width and height values explicitly. When using Flex you can lay it out anywhere in your MXML declaration like any other Flex component.</li>
<li>Default implementations of the <code>IView</code> interface called <code>View</code> are provided for both AS3 (based on <code>Sprite</code>) and Flex (based on <code>SkinnableContainer</code>) projects.</li>
<li>When performing actions on <code>ViewNavigator</code> (like pop, push, etc.) a 	<code>ViewNavigatorEvent.VIEW_CHANGING</code> event is dispatched. This event is 	cancelable so application logic can prevent the view change. Also the event has additional properties like <code>oldView</code> and <code>newView</code> which enable access to the instances of exchanged views.</li>
<li>It is now possible to add custom view transitions. This can be done by implementing the <code>IViewTransition</code> interface and setting its implementation instance to the <code>ViewNavigator</code> object&#8217;s <code>defaultTransition</code> property or by passing it to the <code>ViewNavigator</code> object&#8217;s action functions.</li>
<li>View instances managed by <code>ViewNavigator</code> can be destructed when they are no longer on the top of the stack. This can be controlled with a new property in <code>IView</code> interface named <code>destructionPolicy</code>. This property has two possible values <code>auto</code> and <code>never</code> that are also available in the <code>ViewDestructionPolicy</code> enum class. Default <code>IView</code> implementations have this property set to <code>auto</code>.</li>
</ul>
<p><strong>Using it with Flex (desktop) projects:</strong></p>
<p>Actually this is the feature I&#8217;m most excited about. You may wonder why this is since Flex already comes with the <code>ViewStack</code> component and <code>ViewNavigator</code> available in Flex Hero mobile projects. The reason is that the <code>ViewStack</code> doesn&#8217;t allow two views to be visible at the same time so this type of nice slide transition is not possible (at least the transition in which two views slide in at the same time, I will blog about this in my next post). And as I mentioned already the Flex Hero <code>ViewNavigator</code> is not available for desktop projects, at least not yet. Of course there is a third option, using state transitions, but it doesn&#8217;t come with an API as well thought through as the one in <code>ViewNavigator</code>.</p>
<p>Below you can see it working with Flex (right-click to access the <a href="http://riaspace.com/examples/as3viewnavigator/flex/srcview/index.html">example source code</a>):</p>
<p><center><br />

<object width="350" height="350">
<param name="movie" value="http://riaspace.com/examples/as3viewnavigator/flex/Main.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="350" height="350" src="http://riaspace.com/examples/as3viewnavigator/flex/Main.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</center></p>
<p>In the Main MXML document you can see that <code>ViewNavigator</code> can be treated like any other Flex component. It also has the set of properties that set up the first view and register the <code>ViewNavigatorEvent.VIEW_CHANGING</code> event handler. In the snippet below <code>SampleView</code> is registered as <code>firstView</code> and the <code>viewNumber</code> property of the first view instance is set to 1.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">// Main.mxml
&nbsp;
<span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">			   xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">			   xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">			   xmlns:vn=<span style="color: #ff0000;">&quot;http://ns.riaspace.com/as3viewnavigator&quot;</span></span>
<span style="color: #000000;">			   width=<span style="color: #ff0000;">&quot;350&quot;</span> height=<span style="color: #ff0000;">&quot;350&quot;</span> viewSourceURL=<span style="color: #ff0000;">&quot;http://riaspace.com/examples/as3viewnavigator/flex/srcview/index.html&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">			import com.riaspace.as3viewnavigator.demo.SampleView;</span>
<span style="color: #000000;">			import com.riaspace.as3viewnavigator.events.ViewNavigatorEvent;</span>
&nbsp;
<span style="color: #000000;">			protected function navigator_viewChangingHandler<span style="color: #66cc66;">&#40;</span>event:ViewNavigatorEvent<span style="color: #66cc66;">&#41;</span>:void</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">				txtTrace.appendText<span style="color: #66cc66;">&#40;</span></span>
<span style="color: #000000;">					<span style="color: #ff0000;">&quot;action: &quot;</span> + event.action + </span>
<span style="color: #000000;">					<span style="color: #ff0000;">&quot;, oldView: &quot;</span> + event.oldView + </span>
<span style="color: #000000;">					<span style="color: #ff0000;">&quot; newView: &quot;</span> +  event.newView +</span>
<span style="color: #000000;">					<span style="color: #ff0000;">&quot;\n&quot;</span></span>
<span style="color: #000000;">				<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">		<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> left=<span style="color: #ff0000;">&quot;5&quot;</span> top=<span style="color: #ff0000;">&quot;5&quot;</span> right=<span style="color: #ff0000;">&quot;5&quot;</span> bottom=<span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;vn:ViewNavigator</span> id=<span style="color: #ff0000;">&quot;navigator&quot;</span> firstView=<span style="color: #ff0000;">&quot;{SampleView}&quot;</span> firstViewProps=<span style="color: #ff0000;">&quot;{{viewNumber : 1}}&quot;</span></span>
<span style="color: #000000;">						  viewChanging=<span style="color: #ff0000;">&quot;navigator_viewChangingHandler(event)&quot;</span> </span>
<span style="color: #000000;">						  width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;70%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;lblTrace&quot;</span> text=<span style="color: #ff0000;">&quot;Navigator events:&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:TextArea</span> id=<span style="color: #ff0000;">&quot;txtTrace&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;30%&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span> 
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>The <code>SampleView</code> MXML document extends the <code>View</code> class that comes with as3viewnavigator for Flex. Within the <code>SampleView</code> there are five buttons declared that let you play with <code>ViewNavigator</code> action functions. The code also declares the public <code>viewNumber</code> property that is set by the view that pushed the current view to the top of the stack. The value of the <code>viewNumber</code> property is 1 more than the <code>viewNumber</code> property from the previous view.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">// com/riaspace/as3viewnavigator/demo/SampleView.as
&nbsp;
<span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;vn:View</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">		 xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">		 xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span> </span>
<span style="color: #000000;">		 xmlns:vn=<span style="color: #ff0000;">&quot;http://ns.riaspace.com/as3viewnavigator&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">			import mx.utils.NameUtil;</span>
&nbsp;
<span style="color: #000000;">			override public function toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:String</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">				return NameUtil.createUniqueName<span style="color: #66cc66;">&#40;</span>this<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">		<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Number</span> id=<span style="color: #ff0000;">&quot;viewNumber&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color=<span style="color: #ff0000;">&quot;#f0f0f0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;lblViewNumber&quot;</span> text=<span style="color: #ff0000;">&quot;{viewNumber}&quot;</span> fontSize=<span style="color: #ff0000;">&quot;55&quot;</span> </span>
<span style="color: #000000;">			 top=<span style="color: #ff0000;">&quot;10&quot;</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VGroup</span> bottom=<span style="color: #ff0000;">&quot;10&quot;</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;btnPushView&quot;</span> label=<span style="color: #ff0000;">&quot;push view&quot;</span> width=<span style="color: #ff0000;">&quot;100&quot;</span> </span>
<span style="color: #000000;">				  click=<span style="color: #ff0000;">&quot;navigator.pushView(SampleView, {viewNumber : (viewNumber + 1)})&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;btnPopView&quot;</span> label=<span style="color: #ff0000;">&quot;pop view&quot;</span> width=<span style="color: #ff0000;">&quot;100&quot;</span> </span>
<span style="color: #000000;">				  click=<span style="color: #ff0000;">&quot;navigator.popView()&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;btnPopAll&quot;</span> label=<span style="color: #ff0000;">&quot;pop all&quot;</span> width=<span style="color: #ff0000;">&quot;100&quot;</span> </span>
<span style="color: #000000;">				  click=<span style="color: #ff0000;">&quot;navigator.popAll()&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;btnPopToFirst&quot;</span> label=<span style="color: #ff0000;">&quot;pop to first&quot;</span> width=<span style="color: #ff0000;">&quot;100&quot;</span> </span>
<span style="color: #000000;">				  click=<span style="color: #ff0000;">&quot;navigator.popToFirstView()&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;btnReplace&quot;</span> label=<span style="color: #ff0000;">&quot;replace&quot;</span> width=<span style="color: #ff0000;">&quot;100&quot;</span> </span>
<span style="color: #000000;">				  click=<span style="color: #ff0000;">&quot;navigator.replaceView(SampleView, {viewNumber : (viewNumber + 1)})&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:VGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/vn:View</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p><strong>Using it with AS3 projects:</strong></p>
<p>The example below shows the AS3 version in action. You can also right-click it to access the <a href="http://riaspace.com/examples/as3viewnavigator/as3/srcview/index.html">full source code</a>.</p>
<p><center><br />

<object width="350" height="350">
<param name="movie" value="http://riaspace.com/examples/as3viewnavigator/as3/Main.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="350" height="350" src="http://riaspace.com/examples/as3viewnavigator/as3/Main.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</center></p>
<p>In this example, the <code>ViewNavigator</code> is instantiated and added as a child of the <code>Main</code> class (the <code>Main</code> class listing is below this paragraph). The <code>ViewNavigator</code> constructor receives two parameters: the class type of the first view (<code>SampleView</code>) to display and an <code>Object</code> with view properties to be set (in this case, this is my custom <code>viewNumber</code> property, which will be displayed in the view label). Before <code>ViewNavigator</code> is added as a child to the <code>Main</code> class it also registers a <code>ViewNavigatorEvent.VIEW_CHANGING</code> event handler that traces out info about <code>ViewNavigator</code> actions. Another thing to note here is that the <code>ViewNavigator</code> size is set explicitly in the <code>layoutComponents</code> function using <code>setSize</code> function. It is important to understand that in this situation <code>ViewNavigator</code> will not auto-size itself anymore to the size of the stage. That is why <code>layoutComponents</code> function is also called by stage <code>Event.RESIZE</code> event handler.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Main.as</span>
&nbsp;
package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">viewsource</span>.<span style="color: #006600;">ViewSource</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">riaspace</span>.<span style="color: #006600;">as3viewnavigator</span>.<span style="color: #006600;">ViewNavigator</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">riaspace</span>.<span style="color: #006600;">as3viewnavigator</span>.<span style="color: #006600;">demo</span>.<span style="color: #006600;">SampleView</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">riaspace</span>.<span style="color: #006600;">as3viewnavigator</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">ViewNavigatorEvent</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">controls</span>.<span style="color: #006600;">TextArea</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;350&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;350&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;30&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> navigator:ViewNavigator;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> txtTrace:TextArea;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// Adding source code view</span>
			ViewSource.<span style="color: #006600;">addMenuItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #ff0000;">&quot;http://riaspace.com/examples/as3viewnavigator/as3/srcview/index.html&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP_LEFT</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding trace area</span>
			txtTrace = <span style="color: #000000; font-weight: bold;">new</span> TextArea;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Creating instance of ViewNavigator</span>
			navigator = <span style="color: #000000; font-weight: bold;">new</span> ViewNavigator<span style="color: #66cc66;">&#40;</span>SampleView, <span style="color: #66cc66;">&#123;</span>viewNumber : <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Registering view navigator event handler </span>
			navigator.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>ViewNavigatorEvent.<span style="color: #006600;">VIEW_CHANGING</span>, navigator_viewChangingHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Setting components dimenstions and positions</span>
			layoutComponents<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding txtTrace component</span>
			addChild<span style="color: #66cc66;">&#40;</span>txtTrace<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Adding navigator to the current sprite</span>
			addChild<span style="color: #66cc66;">&#40;</span>navigator<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding resize handler to handle components layout</span>
			<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">RESIZE</span>, <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> layoutComponents<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> layoutComponents<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// Resizing txtTrace component</span>
			txtTrace.<span style="color: #0066CC;">width</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>;
			<span style="color: #808080; font-style: italic;">// Setting fixed height of txtTrace component</span>
			txtTrace.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">60</span>;
			<span style="color: #808080; font-style: italic;">// Positioning txtTrace component below navigator</span>
			txtTrace.<span style="color: #006600;">y</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span> - txtTrace.<span style="color: #0066CC;">height</span>; 
&nbsp;
			<span style="color: #808080; font-style: italic;">// Setting navigator size to be over txtTrace component</span>
			navigator.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span> - txtTrace.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> navigator_viewChangingHandler<span style="color: #66cc66;">&#40;</span>event:ViewNavigatorEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			txtTrace.<span style="color: #006600;">appendText</span><span style="color: #66cc66;">&#40;</span>
				<span style="color: #ff0000;">&quot;action: &quot;</span> + event.<span style="color: #006600;">action</span> + 
				<span style="color: #ff0000;">&quot;, oldView: &quot;</span> + event.<span style="color: #006600;">oldView</span> + 
				<span style="color: #ff0000;">&quot; newView: &quot;</span> +  event.<span style="color: #006600;">newView</span> +
				<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
			<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The <code>SampleView</code> class extends <code>View</code>, which is a default implementation of the <code>IView</code> interface. Because the <code>View</code> class extends Sprite you can add/remove child <code>DisplayObjects</code> to/from it and work with it as with a standard <code>Sprite</code>. Worth mentioning here is overridden function <code>resize</code>. Doing so allows to scale and layout child elements of the view whenever the owning <code>ViewNavigator</code> size changes.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// com/riaspace/as3viewnavigator/demo/SampleView.as</span>
&nbsp;
...
	<span style="color: #006600;">override</span> <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> resize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> element:<span style="color: #0066CC;">Object</span> <span style="color: #b1b100;">in</span> _elements<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> coordinates:<span style="color: #0066CC;">Object</span> = _elements<span style="color: #66cc66;">&#91;</span>element<span style="color: #66cc66;">&#93;</span>;
			<span style="color: #0066CC;">position</span><span style="color: #66cc66;">&#40;</span>DisplayObject<span style="color: #66cc66;">&#40;</span>element<span style="color: #66cc66;">&#41;</span>, coordinates.<span style="color: #006600;">horizontalCenter</span>, 
				coordinates.<span style="color: #006600;">verticalCenter</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
...</pre></div></div>

<div class="shr-publisher-2593"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F03%2Fas3viewnavigator-2-0-0-rc1-released%2F' data-shr_title='as3viewnavigator+2.0.0+RC1+released%21'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F03%2Fas3viewnavigator-2-0-0-rc1-released%2F' data-shr_title='as3viewnavigator+2.0.0+RC1+released%21'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/03/as3viewnavigator-2-0-0-rc1-released/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>NativeApplicationUpdater 0.5.0 released</title>
		<link>http://www.riaspace.com/2011/02/nativeapplicationupdater-0-5-0-released/</link>
		<comments>http://www.riaspace.com/2011/02/nativeapplicationupdater-0-5-0-released/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 12:43:23 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Releases]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[NAU]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2555</guid>
		<description><![CDATA[Today I published a new version (0.5.0) of the NativeApplicationUpdater library to the Google Code project. This is a minor, mostly bug-fix release: Configuring proper XML settings when parsing plist in the HdiutilHelper class (based on contribution from a Erik Pettersson) The update file is downloaded into a temporary folder with its name parsed out of the [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fnativeapplicationupdater-0-5-0-released%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fnativeapplicationupdater-0-5-0-released%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>Today I published a new version (0.5.0) of the <a href="http://www.riaspace.com/2010/08/nativeapplicationupdater-updater-for-air-apps-packaged-with-native-installers" target="_blank">NativeApplicationUpdater</a> library to the <a href="http://code.google.com/p/nativeapplicationupdater/" target="_blank">Google Code project</a>.</p>
<div id="_mcePaste">This is a minor, mostly bug-fix release:</div>
<div id="_mcePaste">
<ul>
<li>Configuring proper XML settings when parsing plist in the HdiutilHelper class (based on contribution from a Erik Pettersson)</li>
<li>The update file is downloaded into a temporary folder with its name parsed out of the download url</li>
<li>If cmd.exe is found it is used to run the update file (based on the contribution from Jeff Pace)</li>
</ul>
</div>
<p>You can also find out more about NativeApplicationUpdater <a href="http://www.riaspace.com/2010/10/building-nativeapplicationupdater-custom-ui/" target="_blank">here</a>.</p>
<div class="shr-publisher-2555"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fnativeapplicationupdater-0-5-0-released%2F' data-shr_title='NativeApplicationUpdater+0.5.0+released'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fnativeapplicationupdater-0-5-0-released%2F' data-shr_title='NativeApplicationUpdater+0.5.0+released'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/02/nativeapplicationupdater-0-5-0-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>as3viewnavigator &#8211; ViewNavigator for as3/flash projects</title>
		<link>http://www.riaspace.com/2011/02/as3viewnavigator-viewnavigator-for-as3flash-projects/</link>
		<comments>http://www.riaspace.com/2011/02/as3viewnavigator-viewnavigator-for-as3flash-projects/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 20:11:33 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Recording]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[as3viewnavigator]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[playbook]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2516</guid>
		<description><![CDATA[I&#8217;m currently working on an application for the BlackBerry PlayBook tablet. The API that comes with the PlayBook SDK is based on pure AS3. Of course I could use Flex Hero for the job but I wanted to try out the “native” stuff that it comes with. My impression so far is really positive and [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fas3viewnavigator-viewnavigator-for-as3flash-projects%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fas3viewnavigator-viewnavigator-for-as3flash-projects%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>I&#8217;m currently working on an application for the <a href="http://us.blackberry.com/playbook-tablet/" target="_blank">BlackBerry PlayBook tablet</a>. The API that comes with the <a href="http://www.blackberry.com/developers/docs/airapi/1.0.0/" target="_blank">PlayBook SDK</a> is based on pure AS3. Of course I could use Flex Hero for the job but I wanted to try out the “native” stuff that it comes with. My impression so far is really positive and the only thing that I&#8217;ve found missing so far was the concept of <a href="http://opensource.adobe.com/wiki/display/flexsdk/View+and+ViewNavigator" target="_blank">Views and ViewNavigator</a> that comes with Flex Hero for mobile devices.</p>
<p>That is why I took a bit of time today to create library heavily inspired by ViewNavigator from Flex Hero that I could use for my pure as3/flash projects. The library is available for download <a href="https://github.com/pwalczyszyn/as3viewnavigator" target="_blank">here</a>. Also checkout the video below for the details on how to use it.</p>
<p>Just for the reference, to tween the view transitions I used <a href="http://code.google.com/p/tweener" target="_blank">Tweener</a> library that is also used internally by PlayBook API.</p>
<p style="text-align: center;"><iframe src="http://player.vimeo.com/video/19492927" width="541" height="338" frameborder="0"></iframe></p>
<p>Below is the snippet of code that implements the example from the video above, you can also download the project source from <a href="https://github.com/downloads/pwalczyszyn/as3viewnavigator/playbook-views.fxp" target="_blank">here</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">riaspace</span>.<span style="color: #006600;">as3viewnavigator</span>.<span style="color: #006600;">ViewNavigator</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">TextFormatAlign</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">buttons</span>.<span style="color: #006600;">LabelButton</span>;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">Container</span>;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">ContainerAlign</span>;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">ContainerFlow</span>;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">SizeMode</span>;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">Spacer</span>;
	<span style="color: #0066CC;">import</span> qnx.<span style="color: #006600;">ui</span>.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">Label</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;600&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;1024&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;30&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> navigator:ViewNavigator;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> viewNumber:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			initializeUI<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> initializeUI<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP_LEFT</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Creating instance of ViewNavigator</span>
			navigator = <span style="color: #000000; font-weight: bold;">new</span> ViewNavigator<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Pushing first view to the navigator</span>
			navigator.<span style="color: #006600;">pushView</span><span style="color: #66cc66;">&#40;</span>createView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Container
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> view:Container = <span style="color: #000000; font-weight: bold;">new</span> Container;
			view.<span style="color: #006600;">flow</span> = ContainerFlow.<span style="color: #006600;">VERTICAL</span>;
			view.<span style="color: #0066CC;">align</span> = ContainerAlign.<span style="color: #006600;">MID</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Incrementing view number</span>
			viewNumber++;
&nbsp;
			<span style="color: #808080; font-style: italic;">// 20% spacer from the top</span>
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Spacer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding label with view number</span>
			<span style="color: #000000; font-weight: bold;">var</span> numLabel:Label = <span style="color: #000000; font-weight: bold;">new</span> Label;
			numLabel.<span style="color: #0066CC;">text</span> = viewNumber.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> format:<span style="color: #0066CC;">TextFormat</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span>;
			format.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">70</span>;
			format.<span style="color: #0066CC;">bold</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			format.<span style="color: #0066CC;">align</span> = TextFormatAlign.<span style="color: #006600;">CENTER</span>;
			numLabel.<span style="color: #006600;">format</span> = format;
			numLabel.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">100</span>;
			numLabel.<span style="color: #006600;">sizeMode</span> = SizeMode.<span style="color: #006600;">BOTH</span>;
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>numLabel<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// 15% spacer between label above and buttons</span>
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Spacer<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">15</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding &quot;push view&quot; button</span>
			<span style="color: #000000; font-weight: bold;">var</span> btn:LabelButton = <span style="color: #000000; font-weight: bold;">new</span> LabelButton;
			btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;push view&quot;</span>;
			btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,
				<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					navigator.<span style="color: #006600;">pushView</span><span style="color: #66cc66;">&#40;</span>createView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>btn<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding &quot;pop view&quot; button</span>
			btn = <span style="color: #000000; font-weight: bold;">new</span> LabelButton;
			btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;pop view&quot;</span>;
			btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,
				<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					navigator.<span style="color: #006600;">popView</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>btn<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding &quot;pop all&quot; button</span>
			btn = <span style="color: #000000; font-weight: bold;">new</span> LabelButton;
			btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;pop all&quot;</span>;
			btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,
				<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					navigator.<span style="color: #006600;">popAll</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>btn<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding &quot;pop to first button&quot; button</span>
			btn = <span style="color: #000000; font-weight: bold;">new</span> LabelButton;
			btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;pop to first&quot;</span>;
			btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,
				<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					navigator.<span style="color: #006600;">popToFirstView</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>btn<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Adding &quot;replace&quot; button</span>
			btn = <span style="color: #000000; font-weight: bold;">new</span> LabelButton;
			btn.<span style="color: #006600;">label</span> = <span style="color: #ff0000;">&quot;replace&quot;</span>;
			btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>,
				<span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
				<span style="color: #66cc66;">&#123;</span>
					navigator.<span style="color: #006600;">replaceView</span><span style="color: #66cc66;">&#40;</span>createView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			view.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>btn<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">return</span> view;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<div class="shr-publisher-2516"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fas3viewnavigator-viewnavigator-for-as3flash-projects%2F' data-shr_title='as3viewnavigator+-+ViewNavigator+for+as3%2Fflash+projects'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F02%2Fas3viewnavigator-viewnavigator-for-as3flash-projects%2F' data-shr_title='as3viewnavigator+-+ViewNavigator+for+as3%2Fflash+projects'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/02/as3viewnavigator-viewnavigator-for-as3flash-projects/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Toaster Lite &#8211; HTTP/AMF monitoring tool</title>
		<link>http://www.riaspace.com/2011/01/toaster-lite-httpamf-monitoring-tool/</link>
		<comments>http://www.riaspace.com/2011/01/toaster-lite-httpamf-monitoring-tool/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 16:30:48 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Releases]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[toaster]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2394</guid>
		<description><![CDATA[My little pet project called Toaster Lite has finally reached the point at which I can share it with the world. In its current state it is just a simple HTTP/AMF monitoring tool that lets you introspect your client-server traffic when doing your Flash/Flex development. You may wonder why I built it. Well first of [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Ftoaster-lite-httpamf-monitoring-tool%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Ftoaster-lite-httpamf-monitoring-tool%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>My little pet project called <strong>Toaster Lite</strong> has finally reached the point at which I can share it with the world. In its current state it is just a simple HTTP/AMF monitoring tool that lets you introspect your client-server traffic when doing your Flash/Flex development.</p>
<p style="text-align: center;">
<a href="http://www.riaspace.com/wp-content/uploads/2011/01/toaster_screenshot1.png"><img src="http://www.riaspace.com/wp-content/uploads/2011/01/toaster_screenshot1.png" alt="" title="toaster_screenshot" width="400" height="313" style="border: 0px;" class="alignnone size-full wp-image-2431" /></a>
</p>
<p>You may wonder why I built it. Well first of all I thought that it would be a cool example of what you can do with the <code>ServerSocket</code> API that came with AIR 2. Secondly I wanted to get better understanding of AMF (Action Message Format) structure. And, last and not least I have further plans for it and what I would like to achieve at some stage is functionality similar to <a href="http://www.soapui.org/" target="_blank">soapUI</a> but for AMF. (BTW: did you know that soapUI has some <a href="http://www.soapui.org/AMF/getting-started.html" target="_blank">basic support for AMF</a> but obviously not enough for me <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p>So what I&#8217;m planning for the next release is the ability to create test suites and test cases based on monitored requests and being able to replay these accordingly. At some point I would like to be able to perform load/stress testing of AMF services with it. I know this is something that would require threading support but maybe the Flash Player team will solve this <a href="http://bugs.adobe.com/jira/browse/ASL-23" target="_blank">somehow</a>. If not, I may endup using Java to do this part of the job and integrate it with the UI using <a href="http://code.google.com/p/flerry/" target="_blank">Flerry</a>.</p>
<p>When building Toaster I managed to extract part of it into a separate as3 library called amf-message-deserializer, which can deserialize AMF requests received through the ServerSocket. The library project is available <a href="http://github.com/pwalczyszyn/amf-message-deserializer">here</a> in GitHub. I want to credit my fellow evangelist James Ward for his <a href="http://www.jamesward.com/2010/07/07/amf-js-a-pure-javascript-amf-implementation/" target="_blank">JSAMF</a> project, which was a great help and a starting point. Other good resources to really understand AMF0 and AMF3 are their open specs available through <a href="http://opensource.adobe.com/wiki/display/blazeds/Developer+Documentation" target="_blank">this</a> site.</p>
<p>To install Toaster Lite just use the badge below:</p>
<p><center><br />

<object width="215" height="180">
<param name="movie" value="http://riaspace.com/toaster/badge/AIRInstallBadge.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<param name="flashvars" value=" airversion=2.5&amp;appname=Toaster%20Lite&amp;appurl=http://riaspace.com/toaster/downloads/ToasterLite.air&amp;image=http://riaspace.com/toaster/badge/badge.png&amp;appid=com.riaspace.ToasterLite&amp;appversion=1.0"></param>
<embed type="application/x-shockwave-flash" width="215" height="180" src="http://riaspace.com/toaster/badge/AIRInstallBadge.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" flashvars=" airversion=2.5&amp;appname=Toaster%20Lite&amp;appurl=http://riaspace.com/toaster/downloads/ToasterLite.air&amp;image=http://riaspace.com/toaster/badge/badge.png&amp;appid=com.riaspace.ToasterLite&amp;appversion=1.0" ></embed>
</object>
<br />
</center></p>
<p>UPDATED 2011.01.13 &#8211; recorded a screencast with Toaster Lite tour:<br />
<center><br />
<iframe src="http://player.vimeo.com/video/18747564" width="541" height="338" frameborder="0"></iframe><br />
</center></p>
<div class="shr-publisher-2394"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Ftoaster-lite-httpamf-monitoring-tool%2F' data-shr_title='Toaster+Lite+-+HTTP%2FAMF+monitoring+tool'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Ftoaster-lite-httpamf-monitoring-tool%2F' data-shr_title='Toaster+Lite+-+HTTP%2FAMF+monitoring+tool'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/01/toaster-lite-httpamf-monitoring-tool/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Resicon &#8211; icons batch resizing tool</title>
		<link>http://www.riaspace.com/2011/01/resicon-icons-batch-resizing-tool/</link>
		<comments>http://www.riaspace.com/2011/01/resicon-icons-batch-resizing-tool/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 16:12:32 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2357</guid>
		<description><![CDATA[Last night when I was working on my pet project (very soon to be released ) I finally got annoyed enough to take 15 minutes off to create this simple utility tool called Resicon. It is an icon batch resizing utility application. It allows you to resize icon images into a predefined set of sizes [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Fresicon-icons-batch-resizing-tool%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Fresicon-icons-batch-resizing-tool%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://www.riaspace.com/wp-content/uploads/2011/01/resicon_screenshot.png"><img class="size-full wp-image-2359 alignleft" style="border: 0px;" title="resicon_screenshot" src="http://www.riaspace.com/wp-content/uploads/2011/01/resicon_screenshot.png" alt="" width="220" height="208" /></a> Last night when I was working on my pet project (very soon to be released <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) I finally got annoyed enough to take 15 minutes off to create this simple utility tool called Resicon. It is an icon batch resizing utility application. It allows you to resize icon images into a predefined set of sizes like: 16&#215;16, 32&#215;32, 36&#215;36, 48&#215;48, 72&#215;72 and 128&#215;128 or use a custom one.</p>
<p>This is a very handy tool because whenever you build an AIR application either a desktop or a mobile one you have to specify a set of its icons in different sizes. Usually this is done by downscaling a single high resolution image to the required sizes. This repetitive task is really annoying and that is why Resicon was brought to life.</p>
<p>Below is an install badge for the Resicon application, the source code is available in GitHub <a href="http://github.com/pwalczyszyn/resicon" target="_blank">here</a>.<br />

<object width="215" height="180">
<param name="movie" value="http://riaspace.com/resicon/badge/AIRInstallBadge.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<param name="flashvars" value=" airversion=2.5&amp;appname=Resicon&amp;appurl=http://apprepo.adobe.com/download/com.riaspace.Resicon.air&amp;image=http://riaspace.com/resicon/badge/badge.png&amp;appid=com.riaspace.Resicon&amp;appversion=1.0"></param>
<embed type="application/x-shockwave-flash" width="215" height="180" src="http://riaspace.com/resicon/badge/AIRInstallBadge.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" flashvars=" airversion=2.5&amp;appname=Resicon&amp;appurl=http://apprepo.adobe.com/download/com.riaspace.Resicon.air&amp;image=http://riaspace.com/resicon/badge/badge.png&amp;appid=com.riaspace.Resicon&amp;appversion=1.0" ></embed>
</object>
<br />
BTW: Resicon icon was created with the very cool <a href="http://icon-generator.net" target="_blank">Icon Generator Pro</a> app.</p>
<div class="shr-publisher-2357"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Fresicon-icons-batch-resizing-tool%2F' data-shr_title='Resicon+-+icons+batch+resizing+tool'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2011%2F01%2Fresicon-icons-batch-resizing-tool%2F' data-shr_title='Resicon+-+icons+batch+resizing+tool'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2011/01/resicon-icons-batch-resizing-tool/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Adobe Evangelist Blogroll released with seasonal theme</title>
		<link>http://www.riaspace.com/2010/12/adobe-evangelist-blogroll-released-with-seasonal-theme/</link>
		<comments>http://www.riaspace.com/2010/12/adobe-evangelist-blogroll-released-with-seasonal-theme/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 14:36:24 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AEB]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2312</guid>
		<description><![CDATA[Before I go to my family for Christmas Eve I just wanted to share with everyone that I released a new version of the Adobe Evangelists Blogroll application that comes with a nice seasonal theme Also I created this simplistic microsite for the AEB app so that you can easily navigate to Android Market or use QR [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelist-blogroll-released-with-seasonal-theme%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelist-blogroll-released-with-seasonal-theme%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>Before I go to my family for Christmas Eve I just wanted to share with everyone that I released a new version of the <a href="http://www.riaspace.com/2010/12/adobe-evangelists-blogroll-preview/" target="_blank">Adobe Evangelists Blogroll</a> application that comes with a nice seasonal theme <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Also I created <a href="http://blogroll.riaspace.com/" target="_blank">this simplistic microsite</a> for the AEB app so that you can easily navigate to Android Market or use QR Code to get it downloaded. So I wish you <strong>Happy Holidays and a Happy New Year!</strong></p>
<p style="text-align: center;">
<a href="http://www.riaspace.com/wp-content/uploads/2010/12/seasonal_landscape.png"><img class="size-medium wp-image-2315" title="seasonal_landscape" src="http://www.riaspace.com/wp-content/uploads/2010/12/seasonal_landscape-300x175.png" style=" border: 0px;" alt="" width="300" height="175" /></a><br />
<a href="http://www.riaspace.com/wp-content/uploads/2010/12/seasonal_landscape.png"></a><a href="http://www.riaspace.com/wp-content/uploads/2010/12/seasonal_portrait.png"><img class="size-medium wp-image-2316" style="margin-top: 10px; margin-bottom: 10px; border: 0px;" title="seasonal_portrait" src="http://www.riaspace.com/wp-content/uploads/2010/12/seasonal_portrait-180x300.png" alt="" width="180" height="300" /></a></p>
<div class="shr-publisher-2312"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelist-blogroll-released-with-seasonal-theme%2F' data-shr_title='Adobe+Evangelist+Blogroll+released+with+seasonal+theme'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelist-blogroll-released-with-seasonal-theme%2F' data-shr_title='Adobe+Evangelist+Blogroll+released+with+seasonal+theme'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2010/12/adobe-evangelist-blogroll-released-with-seasonal-theme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adobe Evangelists Blogroll preview</title>
		<link>http://www.riaspace.com/2010/12/adobe-evangelists-blogroll-preview/</link>
		<comments>http://www.riaspace.com/2010/12/adobe-evangelists-blogroll-preview/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 13:55:07 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Hero]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2201</guid>
		<description><![CDATA[Today I&#8217;m officially announcing my new mobile application called Adobe Evangelists Blogroll. This is a simple RSS reader type of application that aggregates blog feeds from my fellow Adobe Evangelists. I&#8217;ve developed it with a preview release of Flex Hero SDK and it works on all Android devices that can handle AIR runtime. The app is available in Android [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelists-blogroll-preview%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelists-blogroll-preview%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://www.riaspace.com/wp-content/uploads/2010/12/icon128.png"><img class="alignleft size-full wp-image-2233" style="border: 0; margin-left: 10px; margin-right: 10px;" title="blogroll icon" src="http://www.riaspace.com/wp-content/uploads/2010/12/icon128.png" alt="" width="128" height="128" /></a>Today I&#8217;m officially announcing my new mobile application called <strong>Adobe Evangelists Blogroll</strong>. This is a simple RSS reader type of application that aggregates blog feeds from my fellow Adobe Evangelists. I&#8217;ve developed it with a preview release of <a href="http://opensource.adobe.com/wiki/display/flexsdk/Hero" target="_blank">Flex Hero SDK</a> and it works on all Android devices that can handle AIR runtime. The app is available in Android Market if you look for &#8220;<em>Adobe Evangelists Blogroll</em>&#8220;.</p>
<p>What I&#8217;m also really excited about is that I managed to repackage it into a bar file and run it on <a href="http://us.blackberry.com/playbook-tablet/" target="_blank">BlackBerry PlayBook</a> emulator without doing even single change to the codebase. In the video below you can see it in action running on different devices and also on PlayBook emulator.</p>
<p style="text-align: center;"><iframe src="http://player.vimeo.com/video/18009049" width="580" height="362" frameborder="0"></iframe></p>
<p>As I already mentioned it was built with preview release of Flex SDK and also the app itself is in <strong>beta</strong> so it may have some quirks here and there. If you have any suggestions, comments or found some bugs you can contact me through <a href="http://www.riaspace.com/contact-me/" target="_blank">this form</a>.</p>
<p>Few screens of the application (running in landscape &#038; portrait orientation and on playbook):</p>
<p style="text-align: center;">
<a href="http://www.riaspace.com/wp-content/uploads/2010/12/landscape.png"><img class="size-medium wp-image-2207" style="border: 0; margin-left: 10px; margin-right: 10px;" title="blogroll landscape" src="http://www.riaspace.com/wp-content/uploads/2010/12/landscape-300x168.png" alt="" width="300" height="168" /></a>
</p>
<p style="text-align: center;">
<a href="http://www.riaspace.com/wp-content/uploads/2010/12/portrait.png"><img class="size-medium wp-image-2209" style="border: 0; margin-left: 10px; margin-right: 10px;" title="blogroll portrait" src="http://www.riaspace.com/wp-content/uploads/2010/12/portrait-168x300.png" alt="" width="168" height="300" /></a>
</p>
<p style="text-align: center;">
<a href="http://www.riaspace.com/wp-content/uploads/2010/12/playbook.png"><img class="size-large wp-image-2222" style="border: 0; margin-left: 10px; margin-right: 10px;" title="blogroll playbook" src="http://www.riaspace.com/wp-content/uploads/2010/12/playbook-300x198.png" alt="" /></a></p>
<div class="shr-publisher-2201"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelists-blogroll-preview%2F' data-shr_title='Adobe+Evangelists+Blogroll+preview'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2010%2F12%2Fadobe-evangelists-blogroll-preview%2F' data-shr_title='Adobe+Evangelists+Blogroll+preview'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2010/12/adobe-evangelists-blogroll-preview/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>UnFramework &#8211; or how to work without any frameworks</title>
		<link>http://www.riaspace.com/2010/11/unframework-so-how-to-getaway-without-any-framework/</link>
		<comments>http://www.riaspace.com/2010/11/unframework-so-how-to-getaway-without-any-framework/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 15:45:12 +0000</pubDate>
		<dc:creator>Piotr Walczyszyn</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Examples]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[un-framework]]></category>

		<guid isPermaLink="false">http://www.riaspace.com/?p=2013</guid>
		<description><![CDATA[Those who know me or at least subscribe to my blog know that I&#8217;m a big fan of Flex/AS3 frameworks. At this year&#8217;s Adobe MAX conference I even had my own session where I covered five major DI frameworks. Usually these frameworks provide a lot of productivity features and helpers like: IoC/DI, Event/Messaging bus, implementation [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.riaspace.com%2F2010%2F11%2Funframework-so-how-to-getaway-without-any-framework%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.riaspace.com%2F2010%2F11%2Funframework-so-how-to-getaway-without-any-framework%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>Those who know me or at least subscribe to my blog know that I&#8217;m a big fan of Flex/AS3 frameworks. At this year&#8217;s Adobe MAX conference I even had my own session where I covered five major DI frameworks. Usually these frameworks provide a lot of productivity features and helpers like: IoC/DI, Event/Messaging bus, implementation of some architectural or design patterns (MVC, Command&#8230;), and many others. But what happens if we can&#8217;t or don&#8217;t want to use any of these frameworks? </p>
<p><span id="more-2013"></span>Well, we fall back to pure Flex and we start missing things&#8230; </p>
<p>This is something that happened to me very recently when I started to play with <a href="http://opensource.adobe.com/wiki/display/flexsdk/Hero">Flex Hero</a> and I wanted to build my first Flex mobile application. As the targeted runtimes are rather constrained in processing power I knew I would have to make certain sacrifices in order to make things as light as possible. </p>
<p>First I started to wonder what general architectural pattern I should follow. After looking at <a href="http://www.adobe.com/devnet/flex/articles/mobile_development_hero_burrito.html">Flex Hero</a> and its new <code>MobileApplication</code>, <code>ViewNavigator</code> and <code>View</code> concepts, I knew that I was still okay with using the Presentation Model pattern. </p>
<p>Next I took a look at DI frameworks &#8211; well here I really didn&#8217;t find a suitable candidate. Most of these rely heavily on reflection, metadata processing, or stage events capturing for view wiring, and these unfortunately are not really very lightweight. That is why at the end of the day I made a decision not to use any of these, and instead decided to substitute some of their features with simple helpers or pure Flex functionality. </p>
<p><strong>Global Event Dispatcher</strong></p>
<p>The thing I missed most thing was a global dispatcher that I could use to dispatch events from my Presentation Model or any other pure AS3 classes. The approach I took was as simple as creating a global eventDispatcher property in the default package in a eventDispatcher.as file, as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// eventDispatcher.as script file</span>
&nbsp;
package 
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IEventDispatcher</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> eventDispatcher<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:IEventDispatcher
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> _eventDispatcher;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IEventDispatcher</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _eventDispatcher:IEventDispatcher = <span style="color: #000000; font-weight: bold;">new</span> EventDispatcher<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>That step gave me access to <code>eventDispatcher</code> object anywhere in my code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyViewPM
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> btn_clickHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
    <span style="color: #66cc66;">&#123;</span>
        eventDispatcher.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> MyEvent<span style="color: #66cc66;">&#40;</span>MyEvent.<span style="color: #006600;">EVENT_TYPE</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>RemoteObject&#8217;s handling</strong></p>
<p>The next thing I wanted was a clean and simple way of handling <code>RemoteObject</code> calls and configuration. What I really missed here was the approach from the <a href="http://swizframework.org">Swiz Framework</a> with its <code>ServiceHelper.executeServiceCall</code> function where you can pass an <code>AsyncToken</code> object returned from the <code>RemoteObject</code> call together with the <code>ResultEvent</code> and <code>FaultEvent</code> handlers as the other two parameters. </p>
<p>Another thing I really wanted was a declarative (MXML based) configuration of my RemoteObjects and to have a services registry without the use of <code>ServiceLocator</code> pattern. That is why the following code is a bit more complex but I think it&#8217;s still worth it and of course very light:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// remoteService.as script file</span>
&nbsp;
package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">riaspace</span>.<span style="color: #006600;">un</span>.<span style="color: #006600;">IRemoteService</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> remoteService<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:IRemoteService
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> _remoteService;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _remoteService:IRemoteService = <span style="color: #000000; font-weight: bold;">new</span> RemoteService<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">riaspace</span>.<span style="color: #006600;">un</span>.<span style="color: #006600;">IRemoteService</span>;
&nbsp;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">AsyncToken</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">Responder</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">remoting</span>.<span style="color: #006600;">Operation</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">rpc</span>.<span style="color: #006600;">remoting</span>.<span style="color: #006600;">RemoteObject</span>;
&nbsp;
internal <span style="color: #000000; font-weight: bold;">class</span> RemoteService <span style="color: #0066CC;">implements</span> IRemoteService
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> configObj:<span style="color: #0066CC;">Object</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> config<span style="color: #66cc66;">&#40;</span>value:<span style="color: #000000; font-weight: bold;">Class</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		configObj = <span style="color: #000000; font-weight: bold;">new</span> value<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getRemoteObject<span style="color: #66cc66;">&#40;</span>remoteObjectId:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:RemoteObject
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>configObj<span style="color: #66cc66;">&#41;</span>
			<span style="color: #b1b100;">return</span> configObj<span style="color: #66cc66;">&#91;</span>remoteObjectId<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">null</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> callDirectly<span style="color: #66cc66;">&#40;</span>token:AsyncToken, resultHandler:<span style="color: #000000; font-weight: bold;">Function</span>, faultHandler:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		token.<span style="color: #006600;">addResponder</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Responder<span style="color: #66cc66;">&#40;</span>resultHandler, faultHandler<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span>remoteObjectId:<span style="color: #0066CC;">String</span>, methodName:<span style="color: #0066CC;">String</span>, args:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">null</span>, resultHandler:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #000000; font-weight: bold;">null</span>, faultHandler:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> remoteObject:RemoteObject = getRemoteObject<span style="color: #66cc66;">&#40;</span>remoteObjectId<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>remoteObject<span style="color: #66cc66;">&#41;</span>
			<span style="color: #0066CC;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#40;</span>remoteObjectId + <span style="color: #ff0000;">&quot; not configured!&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #000000; font-weight: bold;">var</span> method:Operation = remoteObject<span style="color: #66cc66;">&#91;</span>methodName<span style="color: #66cc66;">&#93;</span>;
		method.<span style="color: #0066CC;">arguments</span> = args;
		callDirectly<span style="color: #66cc66;">&#40;</span>method.<span style="color: #0066CC;">send</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, resultHandler, faultHandler<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>As you can see you can use the above code in multiple ways. The first one requires no additional configuration and uses only <code>remoteService.callDirectly</code> function:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// some AS3 class</span>
&nbsp;
...
<span style="color: #006600;">remoteService</span>.<span style="color: #006600;">callDirectly</span><span style="color: #66cc66;">&#40;</span>myRemoteObject.<span style="color: #006600;">remoteMethod</span><span style="color: #66cc66;">&#40;</span>param<span style="color: #66cc66;">&#41;</span>, remoteMethod_resultHandler, 
    remoteMethod_faultHandler<span style="color: #66cc66;">&#41;</span>;
...
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> remoteMethod_resultHandler<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Handle remote method call result</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> remoteMethod_faultHandler<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Handle remote method call fault</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The next option requires defining a config class that should extend simple Object; the best way is to do it in MXML like this:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;">// RemoteServiceConfig.mxml file
&nbsp;
<span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ChannelSet</span> id=<span style="color: #ff0000;">&quot;channels&quot;</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:AMFChannel</span> url=<span style="color: #ff0000;">&quot;http://yourhost.tld/services/amf&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ChannelSet</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:RemoteObject</span> id=<span style="color: #ff0000;">&quot;myRemoteObject&quot;</span> destination=<span style="color: #ff0000;">&quot;someDestination&quot;</span> channelSet=<span style="color: #ff0000;">&quot;{channels}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Object</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>After you have your configuration class defined you can set it to the <code>remoteService.config</code> property, most probably somewhere at the very beginning of your application lifecycle:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Main.mxml file</span>
...
&nbsp;
<span style="color: #006600;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> mobileapplication_creationCompleteHandler<span style="color: #66cc66;">&#40;</span>event:FlexEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    remoteService.<span style="color: #006600;">config</span> = RemoteServiceConfig;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
...</pre></div></div>

<p>So now you are ready to call the <code>RemoteObject</code> methods, and you can do that like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// some AS3 class</span>
&nbsp;
...
<span style="color: #006600;">remoteService</span>.<span style="color: #0066CC;">call</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;myRemoteObject&quot;</span>, <span style="color: #ff0000;">&quot;remoteMethod&quot;</span>, <span style="color: #66cc66;">&#91;</span>param<span style="color: #66cc66;">&#93;</span>, remoteMethod_resultHandler, 
    remoteMethod_faultHandler<span style="color: #66cc66;">&#41;</span>;
...
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> remoteMethod_resultHandler<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Handle remote method call result</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> remoteMethod_faultHandler<span style="color: #66cc66;">&#40;</span>event:ResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// Handle remote method call fault</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>Application context</strong></p>
<p>The last thing I was really missing was some type of global application context/registry where I could read or write application objects. The approach I took goes beyond a simple singleton dynamic object. It is actually a bindable (event dispatching) singleton dynamic object <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  You can see it&#8217;s implementation below:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// applicationContext.as file</span>
&nbsp;
package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> applicationContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:ApplicationContext
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> _applicationContext;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _applicationContext:ApplicationContext = <span style="color: #000000; font-weight: bold;">new</span> ApplicationContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IEventDispatcher</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Proxy</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">flash_proxy</span>;
&nbsp;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">PropertyChangeEvent</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">PropertyChangeEventKind</span>;
&nbsp;
use namespace flash_proxy;
&nbsp;
internal <span style="color: #0066CC;">dynamic</span> <span style="color: #000000; font-weight: bold;">class</span> ApplicationContext <span style="color: #0066CC;">extends</span> Proxy <span style="color: #0066CC;">implements</span> IEventDispatcher
<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> values:<span style="color: #0066CC;">Object</span>;
&nbsp;
	<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> contextEventHandler:IEventDispatcher;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> ApplicationContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		contextEventHandler = <span style="color: #000000; font-weight: bold;">new</span> EventDispatcher<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
		values = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	flash_proxy override <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">getProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>:<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #66cc66;">*</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> values<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#93;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	flash_proxy override <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">setProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>:<span style="color: #66cc66;">*</span>, value:<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> oldValue:<span style="color: #66cc66;">*</span> = values<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#93;</span>;
		values<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#93;</span> = value;
		<span style="color: #000000; font-weight: bold;">var</span> kind:<span style="color: #0066CC;">String</span> = PropertyChangeEventKind.<span style="color: #006600;">UPDATE</span>;
		dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> PropertyChangeEvent<span style="color: #66cc66;">&#40;</span>PropertyChangeEvent.<span style="color: #006600;">PROPERTY_CHANGE</span>, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">false</span>, kind, <span style="color: #0066CC;">name</span>, oldValue, value, <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> hasEventListener<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> contextEventHandler.<span style="color: #006600;">hasEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> willTrigger<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> contextEventHandler.<span style="color: #006600;">willTrigger</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addEventListener<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #0066CC;">String</span>, listener:<span style="color: #000000; font-weight: bold;">Function</span>, useCapture:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span>, priority:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">0.0</span>, useWeakReference:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		contextEventHandler.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>, listener, useCapture, priority, useWeakReference<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> removeEventListener<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #0066CC;">String</span>, listener:<span style="color: #000000; font-weight: bold;">Function</span>, useCapture:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
	<span style="color: #66cc66;">&#123;</span>
		contextEventHandler.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>, listener, useCapture<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> dispatchEvent<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">return</span> contextEventHandler.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The way to use this is, of course, very simple:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// some AS3 class</span>
...
<span style="color: #006600;">applicationContext</span>.<span style="color: #006600;">myObject</span> = <span style="color: #000000; font-weight: bold;">new</span> MyObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
...
&nbsp;
&nbsp;
<span style="color: #808080; font-style: italic;">// another AS3 class</span>
...
<span style="color: #000000; font-weight: bold;">var</span> myObject:MyObject = applicationContext.<span style="color: #006600;">myObject</span>;
...</pre></div></div>

<p>The cool thing about this approach is that you can actually bind to your <code>applicationContext.myObject</code> without getting this nasty warning: <code>unable to bind to property 'foo' on class 'Object' (class is not an IEventDispatcher).</code></p>
<p>Also if you would like to listen for changes done to applicationContext properties you can do it like this (in order to make code completion work you need to cast <code>applicationContext</code> to <code>IEventDispatcher</code>):</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// some AS3 class</span>
...
<span style="color: #006600;">IEventDispatcher</span><span style="color: #66cc66;">&#40;</span>applicationContext<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>
    PropertyChangeEvent.<span style="color: #006600;">PROPERTY_CHANGE</span>, applicationContext_changeHandler<span style="color: #66cc66;">&#41;</span>;
...</pre></div></div>

<p><strong>My UnFramework approach summary</strong></p>
<p>So in the end you can see there is actually life <img src='http://www.riaspace.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  without frameworks, especially when you are building not very complex applications that don&#8217;t require module support (in that case the singleton approach used here would fail).</p>
<p>Now please don&#8217;t accuse me of building yet another framework (we already have plenty of really great ones available) but I have packaged all these helper functions into a Flex Library project and pushed it into a GitHub repository. As I said this is not a framework so its called <strong>un-framework</strong> and it is available for download from <a href="https://github.com/pwalczyszyn/un-framework" target="_blank">here</a> and as a swc from <a href="https://github.com/downloads/pwalczyszyn/un-framework/un-framework-1.0.0.swc" target="_blank">here</a>.</p>
<p>Stay tuned for my upcoming posts where you will see these functions in action on some of my Flex Mobile apps.</p>
<div class="shr-publisher-2013"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2010%2F11%2Funframework-so-how-to-getaway-without-any-framework%2F' data-shr_title='UnFramework+-+or+how+to+work+without+any+frameworks'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.riaspace.com%2F2010%2F11%2Funframework-so-how-to-getaway-without-any-framework%2F' data-shr_title='UnFramework+-+or+how+to+work+without+any+frameworks'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.riaspace.com/2010/11/unframework-so-how-to-getaway-without-any-framework/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

