<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Blog of Shaun McCran - Architecting robust, elegant technical and business solutions - AIR</title>
			<link>http://www.mccran.co.uk/index.cfm</link>
			<description>I write about Architecture and Design, Architectural patterns, Architectural Principles and Architectural policies. This includes TOGAF, Zachman, Business Architecture, SOA and Process and tools such as the IBM Rational software and Adobe products. I also write about my previous life as a mobile and web developer.</description>
			<language>en-gb</language>
			<pubDate>Tue, 09 Jun 2026 06:55:59 -0000</pubDate>
			<lastBuildDate>Tue, 25 Jan 2011 12:12:00 -0000</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>shaun@mccran.co.uk</managingEditor>
			<webMaster>shaun@mccran.co.uk</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>shaun@mccran.co.uk</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Chroma circuit Android game review</title>
				<link>http://www.mccran.co.uk/index.cfm/2011/1/25/Chroma-circuit-Android-game-review</link>
				<description>
				
				I&apos;ve been waiting for Bowler Hat games &lt;a href=&quot;http://www.appbrain.com/app/chroma-circuit/air.com.bowlerhatgames.mobile.ChromaCircuit&quot; target=&quot;_blank&quot;&gt;Chroma Circuit&lt;/a&gt; for a while now. It was demonstrated at Scotch on the Rocks last year, and it looked like quite an innovative mobile puzzle game.
				 [More]
				</description>
				
				
				<category>Android</category>
				
				<category>AIR</category>
				
				<category>Mobile</category>
				
				<pubDate>Tue, 25 Jan 2011 12:12:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2011/1/25/Chroma-circuit-Android-game-review</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Finding the system file storage in AIR</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/7/28/Finding-the-system-file-storage-in-AIR</link>
				<description>
				
				When progamming an AIR application, you may want to make use of the applicationStorageDirectory available via the flash.filesystem package to store temporary files/folders.  You can find where your system is storing these files by doing something like the following:

&lt;code&gt;
var f:File = File.applicationStorageDirectory.resolvePath(&quot;Test.txt&quot;);
trace(f.nativePath + &apos; is where my file is stored&apos;);
&lt;/code&gt;

This will give you an absolute path to the local system file storage location. Handy for multi platform applications, as Pc and MAC based systems will use different default storage directories.
				
				</description>
				
				
				<category>Development</category>
				
				<category>AIR</category>
				
				<category>File Interactions</category>
				
				<category>RIA</category>
				
				<pubDate>Tue, 28 Jul 2009 12:00:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/7/28/Finding-the-system-file-storage-in-AIR</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Opening a new window from a flex / AIR application</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/6/12/Opening-a-new-window-from-a-flex--AIR-application</link>
				<description>
				
				I was sure I had done this before, somewhere but I couldn&apos;t find the code anywhere. So I&apos;ve knocked together a really quick and simple example.

I want to be able to open a new site in a pop up from an AIR application. To do this I need to use the &apos;urlRequest&apos; function to create a url request. Then insert that into a &apos;navigateToURL&apos; method, specifying that you want a new window &apos;_new&apos;.

Here is the complete example.

&lt;code&gt;

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;&gt;

&lt;mx:Script&gt;
	&lt;![CDATA[

	  public function goToUrl(link:String):void
	  {
		var urlRequest:URLRequest = new URLRequest(&apos;http://&apos; + link);
		navigateToURL(urlRequest, &quot;_new&quot;);
	  }   
		
	]]&gt;
&lt;/mx:Script&gt;
	
	&lt;mx:Canvas x=&quot;10&quot; y=&quot;10&quot; width=&quot;321&quot; height=&quot;146&quot; backgroundColor=&quot;#FFFFFF&quot;&gt;
		&lt;mx:Form x=&quot;10&quot; y=&quot;52&quot;&gt;
			&lt;mx:FormItem label=&quot;URL&quot;&gt;
				&lt;mx:TextInput id=&quot;urlTxt&quot;/&gt;
			&lt;/mx:FormItem&gt;
		&lt;/mx:Form&gt;
		&lt;mx:Button x=&quot;10&quot; y=&quot;114&quot; label=&quot;Go to&quot; click=&quot;goToUrl(urlTxt.text)&quot;/&gt;
		&lt;mx:Label x=&quot;10&quot; y=&quot;10&quot; text=&quot;New Window test&quot; /&gt;
	&lt;/mx:Canvas&gt;
	
&lt;/mx:Application&gt;

&lt;/code&gt;

Works like this.

&lt;a href=&quot;http://www.mccran.co.uk/newWindowTest.html&quot; target=&quot;_newwin&quot;&gt;View demo&lt;/a&gt;.
				
				</description>
				
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Fri, 12 Jun 2009 14:34:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/6/12/Opening-a-new-window-from-a-flex--AIR-application</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Adding custom Chrome to your AIR application</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/4/6/Adding-custom-Chrome-to-your-AIR-application</link>
				<description>
				
				Whilst creating my last AIR application I found that the standard &apos;Chrome&apos; that is provided by the OS just didn&apos;t match the application look and feel at all.

After a little searching I found that there are a few key elements in your application that you need to change to remove the standard operating system Chrome, and stop Flex builder from replacing it with its own.

Firstly in your &lt;i&gt;application-app.xml&lt;/i&gt; document look for the &apos;systemChrome&apos; xml value. Setting this to none will disable the operating system Chrome. As we are using the &apos;WindowedApplication&apos; Flex builder will automatically start using its own Chrome framework, so we need to turn that off too.

&lt;code&gt;
&lt;!-- The type of system chrome to use (either &quot;standard&quot; or &quot;none&quot;). Optional. Default standard. --&gt;
&lt;systemChrome&gt;none&lt;/systemChrome&gt;

&lt;!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. --&gt;
&lt;transparent&gt;true&lt;/transparent&gt;

&lt;/code&gt;

This is done in the WindowedApplication code, set showFlexChrome=&quot;false&quot; and that will disable Flex from using its default Chrome.

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:WindowedApplication xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; initialize=&quot;init()&quot; showFlexChrome=&quot;false&quot;&gt;

&lt;/code&gt;

Now that we have completely turned it all off, we need to build our own. In this application I am using a canvas with rounded corners that is 15 pixels larger than the application canvas, to give the impression of a border all the way around. Inside that canvas I&apos;ve added two controls.

&lt;code&gt;
&lt;mx:Label text=&quot;_&quot; styleName=&quot;controls&quot; toolTip=&quot;Minimize&quot; x=&quot;173&quot; y=&quot;-2&quot; click=&quot;onMinimize()&quot; /&gt;
&lt;mx:Label text=&quot;X&quot; styleName=&quot;controls&quot; toolTip=&quot;Close&quot; x=&quot;184&quot; y=&quot;1&quot; click=&quot;onClose()&quot; /&gt;

&lt;/code&gt;

These simply replicate the functionality that the minimise and close buttons give a user on a standard window. The functions they call are:

&lt;code&gt;
	  
	  public function onMinimize():void
	  {
	  	stage.nativeWindow.minimize();
	  }
	  
	  public function onClose():void
	  {
	  	stage.nativeWindow.close();
	  }    

&lt;/code&gt;

And with that you fully customise the look and feel of your applications Chrome.
				
				</description>
				
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<pubDate>Mon, 06 Apr 2009 12:23:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/4/6/Adding-custom-Chrome-to-your-AIR-application</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>AIR Phone Book application - Part 3 (Full code)</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-3-Full-code</link>
				<description>
				
				Below is the full code in one run for the PhoneBook AIR application.

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:WindowedApplication xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; initialize=&quot;init()&quot; 
	height=&quot;280&quot; width=&quot;294&quot; horizontalAlign=&quot;center&quot; verticalAlign=&quot;middle&quot; showFlexChrome=&quot;false&quot;&gt;

&lt;mx:Script&gt;
	&lt;![CDATA[
	  
	  import mx.controls.Alert;
      import mx.collections.*;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.collections.ArrayCollection;

	  [Bindable]
	  private var loadedData:ArrayCollection;
      
      public function init():void
      {
		// start the move listener
		moveListener()
      	// get the remote data
      	getData()
      }
      
      public function moveListener():void
      {
		// mover event
		outerCanvas.addEventListener( MouseEvent.MOUSE_DOWN, moveWindow );  	
      }     
             
      public function getData():void
      {
      	popData.getData();
      }

	  public function moveWindow( event:MouseEvent ):void
	  {
		var str:String = event.target.valueOf();

		  // if its a datagrid then don&apos;t do the move
		  if ( str.search(&quot;displayPeople&quot;) &gt;= 1)
		  {
		  	// Do nothing
		  }
		  else
		  {
		  	stage.nativeWindow.startMove();
		  }
	  }
	  
	  public function onMinimize():void
	  {
	  	stage.nativeWindow.minimize();
	  }
	  
	  public function onClose():void
	  {
	  	stage.nativeWindow.close();
	  }    

	  public function resultsHandler(event:ResultEvent):void
	  {
		// trace(event.result)
		displayPeople.dataProvider = popData.getData.lastResult
	  } 

	  public function faultHandler(event:FaultEvent):void
	  {
		Alert.show(&quot;Error: &quot; + event.fault.faultString, &quot;Application Error&quot;);
	  }

	  public function changeImage(img:String):void
	  {
	  	userImage.visible = true
	  	userImage.source = &quot;http://www.url.co.uk/wld/phonebook/&quot; + img
	  }   

   ]]&gt;
&lt;/mx:Script&gt;

&lt;mx:Style&gt;
	.header {color: #70c7f1;}
	.greyHeader {color: #777879;}
	.controls {color: #000000; font-size: 13pt;}
&lt;/mx:Style&gt;

 	&lt;mx:WebService id=&quot;popData&quot; wsdl=&quot;http://www.url.co.uk/wld/services/phoneBook.cfc?wsdl&quot; showBusyCursor=&quot;true&quot; useProxy=&quot;false&quot;&gt;
        &lt;mx:operation name=&quot;getData&quot; fault=&quot;faultHandler(event)&quot; result=&quot;resultsHandler(event)&quot; /&gt;
    &lt;/mx:WebService&gt;

 	&lt;mx:Fade id=&quot;fadeOut&quot; duration=&quot;1.0&quot; alphaFrom=&quot;1.0&quot; alphaTo=&quot;0.0&quot;/&gt;
    &lt;mx:Fade id=&quot;fadeIn&quot; duration=&quot;2000&quot; alphaFrom=&quot;0.0&quot; alphaTo=&quot;1.0&quot;/&gt;

	&lt;mx:Canvas id=&quot;outerCanvas&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;220&quot; height=&quot;240&quot; backgroundColor=&quot;#70c7f1&quot; borderStyle=&quot;solid&quot; cornerRadius=&quot;25&quot; borderThickness=&quot;0&quot;&gt;
	
		&lt;mx:Canvas id=&quot;innerCanvas&quot; x=&quot;10&quot; y=&quot;22&quot; width=&quot;200&quot; height=&quot;210&quot; backgroundColor=&quot;#FFFFFF&quot; borderStyle=&quot;solid&quot; cornerRadius=&quot;25&quot; borderThickness=&quot;0&quot;&gt;
			
			&lt;mx:Label x=&quot;10&quot; y=&quot;10&quot; text=&quot;White label&quot; id=&quot;header&quot; styleName=&quot;header&quot; fontWeight=&quot;bold&quot;/&gt;
			&lt;mx:Label x=&quot;78&quot; y=&quot;10&quot; text=&quot;Dating PhoneBook&quot; styleName=&quot;greyHeader&quot; fontWeight=&quot;bold&quot;/&gt;
			&lt;mx:DataGrid id=&quot;displayPeople&quot; x=&quot;10&quot; y=&quot;32&quot; width=&quot;180&quot; height=&quot;108&quot; itemClick=&quot;changeImage(displayPeople.selectedItem.IMAGE)&quot;&gt;
				&lt;mx:columns&gt;
					&lt;mx:DataGridColumn headerText=&quot;Name&quot; width=&quot;140&quot; dataField=&quot;NAME&quot;/&gt;
					&lt;mx:DataGridColumn headerText=&quot;No.&quot; width=&quot;40&quot; dataField=&quot;NO&quot;/&gt;
					&lt;mx:DataGridColumn headerText=&quot;Img&quot; width=&quot;40&quot; dataField=&quot;IMAGE&quot; visible=&quot;false&quot;/&gt;
				&lt;/mx:columns&gt;
			&lt;/mx:DataGrid&gt;
			&lt;mx:Image x=&quot;138&quot; y=&quot;150&quot; source=&quot;@Embed(source=&apos;wldLogoTiny.png&apos;)&quot; /&gt;
			&lt;mx:Image x=&quot;25&quot; y=&quot;144&quot; toolTip=&quot;{displayPeople.selectedItem.NAME}&quot; id=&quot;userImage&quot; visible=&quot;true&quot; showEffect=&quot;{fadeIn}&quot; /&gt;
		&lt;/mx:Canvas&gt;
		&lt;mx:Label text=&quot;_&quot; styleName=&quot;controls&quot; toolTip=&quot;Minimize&quot; x=&quot;173&quot; y=&quot;-2&quot; click=&quot;onMinimize()&quot; /&gt;
		&lt;mx:Label text=&quot;X&quot; styleName=&quot;controls&quot; toolTip=&quot;Close&quot; x=&quot;184&quot; y=&quot;1&quot; click=&quot;onClose()&quot; /&gt;

	&lt;/mx:Canvas&gt;

&lt;/mx:WindowedApplication&gt;
&lt;/code&gt;

&lt;img src=&quot;http://www.mccran.co.uk/images/images//phonebookScreenShot.jpg&quot; alt=&quot;PhoneBook screen shot&quot;&gt;
				
				</description>
				
				
				<category>Flex Remoting</category>
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Fri, 03 Apr 2009 15:17:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-3-Full-code</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>AIR Phone Book application - Part 2 (Functions and WebService)</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-2-Functions-and-WebService</link>
				<description>
				
				As our application starts I want to fire the request for data, so we call an init() method on initialization. Also I have turned the flex chrome off here with &apos;showFlexChrome=&quot;false&quot;&apos;.

&lt;code&gt;
&lt;mx:WindowedApplication xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; initialize=&quot;init()&quot; 
	height=&quot;280&quot; width=&quot;294&quot; horizontalAlign=&quot;center&quot; verticalAlign=&quot;middle&quot; showFlexChrome=&quot;false&quot;&gt;
&lt;/code

The init() method calls an event listener that controls the window movement (Drag and drop) and makes a call to getData().

&lt;code&gt;
	  import mx.controls.Alert;
      import mx.collections.*;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;
      import mx.collections.ArrayCollection;

	  [Bindable]
	  private var loadedData:ArrayCollection;
      public function init():void
      {
		// start the move listener
		moveListener()
      	// get the remote data
      	getData()
      }
&lt;/code&gt;

The moveListener() method adds a listener to the outerCanvas element which forms the application &apos;border&apos;.  When this event is fired it calls moveWindow.

The getData() function calls the webservice, and specifies which method to call.

&lt;code&gt;
     public function moveListener():void
      {
		// mover event
		outerCanvas.addEventListener( MouseEvent.MOUSE_DOWN, moveWindow );  	
      }     
             
      public function getData():void
      {
      	popData.getData();
      }
	  public function moveWindow( event:MouseEvent ):void
	  {
		var str:String = event.target.valueOf();

		  // if its a datagrid then don&apos;t do the move
		  if ( str.search(&quot;displayPeople&quot;) &gt;= 1)
		  {
		  	// Do nothing
		  }
		  else
		  {
		  	stage.nativeWindow.startMove();
		  }
	  }
&lt;/code&gt;

The moveWindow function also contains a check to see if the datagrid was the event target, as this was interfering with the functionality of the Datagrid. It would be interesting to see if anyone else has a more elegant solution to this, rather than a specific element check.

To populate our datagrid we need to use a data provider. In FLEX applications I usually use the RemoteObject function, but for AIR I&apos;ve been using the WebService tag.

&lt;code&gt;
	&lt;mx:WebService id=&quot;popData&quot; wsdl=&quot;http://url/wld/services/phoneBook.cfc?wsdl&quot; showBusyCursor=&quot;true&quot; useProxy=&quot;false&quot;&gt;
        &lt;mx:operation name=&quot;getData&quot; fault=&quot;faultHandler(event)&quot; result=&quot;resultsHandler(event)&quot; /&gt;
    &lt;/mx:WebService&gt;

&lt;/code&gt;

The final two &apos;chrome&apos; functions we need are the minimize and close functions. I will detail handling custom chrome in another article.

&lt;code&gt;
  
	  public function onMinimize():void
	  {
	  	stage.nativeWindow.minimize();
	  }
	  
	  public function onClose():void
	  {
	  	stage.nativeWindow.close();
	  }    
&lt;/code&gt;

Our WebService is referencing two functions. A results handler and a fault handler.

&lt;code&gt;

	  public function resultsHandler(event:ResultEvent):void
	  {
		// trace(event.result)
		displayPeople.dataProvider = popData.getData.lastResult
	  } 

	  public function faultHandler(event:FaultEvent):void
	  {
		Alert.show(&quot;Error: &quot; + event.fault.faultString, &quot;Application Error&quot;);
	  }

&lt;/code&gt;

The resultsHandler() simply assigns the datagrids dataprovider as the result of the WebService call. By adding DataGridColumn&apos;s to the datagrid with the right naming convention our results from the returned query object will map directly to our datagrid.

The faultHandler() function simply Alerts a user to a fault event.

Lastly I have a function that assigns the image source dynamically based on the click event in the datagrid.

&lt;code&gt;
	  public function changeImage(img:String):void
	  {
	  	userImage.visible = true
	  	userImage.source = &quot;http://url/wld/phonebook/&quot; + img
	  }   
&lt;/code&gt;

So that completes the Phone Book AIR application. There are one or two tweaks I&apos;d like to make in the image handling, but otherwise its exactly the spec I had in mind.

You can view the full code &lt;a href=&quot;http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-3-Full-code&quot;&gt;here&lt;/a&gt;.
				
				</description>
				
				
				<category>Flex Remoting</category>
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Fri, 03 Apr 2009 15:13:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-2-Functions-and-WebService</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>AIR Phone Book application - Part 1 (CFC and GUI)</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-1-CFC-and-GUI</link>
				<description>
				
				I&apos;m always asking what peoples phone numbers are in the office, we currently don&apos;t have any internal communications (like an intranet) so I thought I&apos;d create a handy phone book application in AIR.

With FLEX of AIR applications I often wireframe them up with the data model in mind first. If you know what data you are going to display, and the format and delivery mechanism of that data, it can often have a large impact on the design and layout of your application.

In this instance I was just returning a simple query object of users and their phone numbers and a thumbnail image.

&lt;h3&gt;The CFC&lt;/h3&gt;

My preferred server language is ColdFusion, so my service is a CFC object.

&lt;code&gt;
&lt;cfcomponent hint=&quot;WLD phoneBook&quot; output=&quot;false&quot;&gt;

	&lt;cffunction name=&quot;getData&quot; access=&quot;remote&quot; hint=&quot;Gets phoneBook data&quot; returntype=&quot;query&quot;&gt;
	
		&lt;cfquery datasource=&quot;#application.dns#&quot; name=&quot;qGetPB&quot;&gt;
			select 	id AS ID, 
					name AS Name,
					number AS No,
					image As Image
			from phonebook 
			Order by name
		&lt;/cfquery&gt;

		&lt;cfreturn qGetPB&gt;
	&lt;/cffunction&gt;
	
&lt;/cfcomponent&gt;
&lt;/code&gt;

In my example I&apos;m using an MS SQL database, so I have included the creation script here:

&lt;code&gt;
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[phonebook](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [varchar](20) NULL DEFAULT (NULL),
	[number] [int] NULL DEFAULT (NULL),
	[image] [varchar](55) NULL DEFAULT (NULL)
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
&lt;/code&gt;

Now that we know what the data will look like we can build the GUI front end.

My display layer is going to be a canvas, with another canvas inside it, to create a bordered effect.

Then I have a DataGrid, with a click event that will call an AS function. This will control the displaying of an image that corresponds to the user being clicked. Its always nice to see who you want to call!

&lt;code&gt;
&lt;mx:Fade id=&quot;fadeOut&quot; duration=&quot;1.0&quot; alphaFrom=&quot;1.0&quot; alphaTo=&quot;0.0&quot;/&gt;
&lt;mx:Fade id=&quot;fadeIn&quot; duration=&quot;2000&quot; alphaFrom=&quot;0.0&quot; alphaTo=&quot;1.0&quot;/&gt;
	&lt;mx:Canvas id=&quot;outerCanvas&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;220&quot; height=&quot;240&quot; backgroundColor=&quot;#70c7f1&quot; borderStyle=&quot;solid&quot; cornerRadius=&quot;25&quot; borderThickness=&quot;0&quot;&gt;
	
		&lt;mx:Canvas id=&quot;innerCanvas&quot; x=&quot;10&quot; y=&quot;22&quot; width=&quot;200&quot; height=&quot;210&quot; backgroundColor=&quot;#FFFFFF&quot; borderStyle=&quot;solid&quot; cornerRadius=&quot;25&quot; borderThickness=&quot;0&quot;&gt;
			
			&lt;mx:Label x=&quot;10&quot; y=&quot;10&quot; text=&quot;White label&quot; id=&quot;header&quot; styleName=&quot;header&quot; fontWeight=&quot;bold&quot;/&gt;
			&lt;mx:Label x=&quot;78&quot; y=&quot;10&quot; text=&quot;Dating PhoneBook&quot; styleName=&quot;greyHeader&quot; fontWeight=&quot;bold&quot;/&gt;
			&lt;mx:DataGrid id=&quot;displayPeople&quot; x=&quot;10&quot; y=&quot;32&quot; width=&quot;180&quot; height=&quot;108&quot; itemClick=&quot;changeImage(displayPeople.selectedItem.IMAGE)&quot;&gt;
				&lt;mx:columns&gt;
					&lt;mx:DataGridColumn headerText=&quot;Name&quot; width=&quot;140&quot; dataField=&quot;NAME&quot;/&gt;
					&lt;mx:DataGridColumn headerText=&quot;No.&quot; width=&quot;40&quot; dataField=&quot;NO&quot;/&gt;
					&lt;mx:DataGridColumn headerText=&quot;Img&quot; width=&quot;40&quot; dataField=&quot;IMAGE&quot; visible=&quot;false&quot;/&gt;
				&lt;/mx:columns&gt;
			&lt;/mx:DataGrid&gt;
			&lt;mx:Image x=&quot;138&quot; y=&quot;150&quot; source=&quot;@Embed(source=&apos;wldLogoTiny.png&apos;)&quot; /&gt;
			&lt;mx:Image x=&quot;25&quot; y=&quot;144&quot; toolTip=&quot;{displayPeople.selectedItem.NAME}&quot; id=&quot;userImage&quot; visible=&quot;true&quot; showEffect=&quot;{fadeIn}&quot; /&gt;
		&lt;/mx:Canvas&gt;
		&lt;mx:Label text=&quot;_&quot; styleName=&quot;controls&quot; toolTip=&quot;Minimize&quot; x=&quot;173&quot; y=&quot;-2&quot; click=&quot;onMinimize()&quot; /&gt;
		&lt;mx:Label text=&quot;X&quot; styleName=&quot;controls&quot; toolTip=&quot;Close&quot; x=&quot;184&quot; y=&quot;1&quot; click=&quot;onClose()&quot; /&gt;

	&lt;/mx:Canvas&gt;
&lt;/code&gt;

My &apos;userImage&apos;has a showEffect attribute, that uses an image fadeIn method. It fades in the first image called, but not any others, I&apos;ve had a play around with this, and I can&apos;t get it to fade in subsequent images, so if anyone has any ideas let me know!

Lastly I have added some chrome controls, as I will be removing the standard chrome, and building my own.

Now, on to the &lt;a href=&quot;http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-2-Functions-and-WebService&quot;&gt;functions&lt;/a&gt;.
				
				</description>
				
				
				<category>Flex Remoting</category>
				
				<category>Coldfusion</category>
				
				<category>AIR</category>
				
				<category>SQL</category>
				
				<category>RIA</category>
				
				<pubDate>Fri, 03 Apr 2009 14:46:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/4/3/AIR-Phone-Book-application--Part-1-CFC-and-GUI</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Adobe AIR Web Service Hello World test application</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/4/2/Adobe-AIR-Web-Service-Hello-World-test-application</link>
				<description>
				
				I&apos;ve recently been looking at putting together some AIR applications. I&apos;ve used FLEX for a few years now, and have only just come up with some &lt;i&gt;useful&lt;/i&gt; AIR ideas, so I thought I&apos;d build an application or two.

Usually I would use flash remoting, but I haven&apos;t spent too much time investigating how this works in AIR, so I&apos;ve opted for the old school Web Service.

In the middle of my newest AIR application I stumbled upon an issue. No matter what I did I was receiving a &apos;HTTP Error&apos; response from my Web Service. After stumbling around in the dark for a while tweaking code to no avail, I decided to write the most basic Web Service I could think of.

So here is &apos;Hello World&apos;, as a Web Service call from AIR.

Firstly create a call to your Web Service. In this case it was a local file. Point the wsdl variable at the fully qualified path to your service. I am using a coldFusion back end, so it is a CFC. This is also where you specify the fault handler and result handlers. You can add as many &apos;operation&apos; methods here as you want, that way you address specific functions in your service individually.

&lt;code&gt;
 	&lt;mx:WebService id=&quot;getMessages&quot; wsdl=&quot;http://192.168.XX.XXX/root/services/message.cfc?wsdl&quot; showBusyCursor=&quot;true&quot;&gt;
        &lt;mx:operation name=&quot;sayHello&quot; fault=&quot;faultHandler(event)&quot; result=&quot;resultsHandler(event)&quot; /&gt;
    &lt;/mx:WebService&gt;
 	&lt;mx:Button x=&quot;10&quot; y=&quot;10&quot; label=&quot;Click me&quot; click=&quot;getData()&quot;/&gt;
	
&lt;/mx:WindowedApplication&gt;
&lt;/code&gt;

I&apos;ve also added a button that will call a function to action the service call.

Next we will add the functions.

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:WindowedApplication xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot;&gt;

&lt;mx:Script&gt;
	&lt;![CDATA[
		import mx.rpc.events.ResultEvent;
		import mx.rpc.events.FaultEvent;
		import mx.controls.Alert;
		
      private function getData():void{
      	getMessages.sayHello();
      	
      }

	  private function faultHandler(event:FaultEvent):void
	  {
		Alert.show(&quot;Error: &quot; + event.fault.faultString, &quot;Application Error&quot;);
	  }

	  private function resultsHandler(event:ResultEvent):void
	  {
		Alert.show(String(event.result))
		
	  } 
	
	]]&gt;
&lt;/mx:Script&gt;
&lt;/code&gt;

A getter function, that will actually send the Service request, a fault handler that will simply Alert the user to a fault event, and a result handler that Alerts the user to whatever message is returned from the Web Service.

&lt;h3&gt;The CFC&lt;/h3&gt;

The CFC service is a simply object to return a string. Just make sure that your &apos;Access&apos; is set to remote.

&lt;code&gt;
&lt;cfcomponent displayname=&quot;message&quot;&gt;


	&lt;cffunction name=&quot;sayHello&quot; displayname=&quot;sayHello&quot; hint=&quot;it says hello&quot; access=&quot;remote&quot; output=&quot;true&quot; returntype=&quot;String&quot;&gt;
		
		&lt;cfset var message = &quot;Hello world&quot;&gt;
		
		&lt;cfreturn message/&gt;
	&lt;/cffunction&gt;

&lt;/cfcomponent&gt;
&lt;/code&gt;

So we end out with:








&lt;img src=&quot;http://www.mccran.co.uk/images/images//helloWorld.jpg&quot;&gt;
				
				</description>
				
				
				<category>Flex Remoting</category>
				
				<category>Coldfusion</category>
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Thu, 02 Apr 2009 10:55:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/4/2/Adobe-AIR-Web-Service-Hello-World-test-application</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Adobe releases Tour-de-Flex as Eclipse plugin</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/4/1/Adobe-releases-TourdeFlex-as-Eclipse-plugin</link>
				<description>
				
				I was directed to the Adobe Developer Connection site by a colleague the other day, and told to go look at &apos;&lt;a href=http://www.adobe.com/devnet/flex/tourdeflex/ target=&quot;new_win&quot;&gt;Tour-de-Flex&lt;/a&gt;&apos;.

&lt;iframe width=&quot;216&quot; height=&quot;182&quot; frameborder=0 scrolling=&quot;no&quot; src=&quot;http://tourdeflex.adobe.com/badge/&quot;&gt;&lt;/iframe&gt;

Its an AIR/Web application that hosts a whole range of example FLEX and AIR resources. 

Its also available as a handy eclipse plugin, if you are that way inclined :-)

I&apos;ve had a brief look around it, and it looks pretty good, very handy having code examples and themes right there on your desktop. 

Also gave me some interesting trains of thought of the next AIR application I have in mind....
				
				</description>
				
				
				<category>Eclipse</category>
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Wed, 01 Apr 2009 11:00:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/4/1/Adobe-releases-TourdeFlex-as-Eclipse-plugin</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Adobe brings AIR to Linux</title>
				<link>http://www.mccran.co.uk/index.cfm/2008/12/19/Adobe-brings-AIR-to-Linux</link>
				<description>
				
				Adobe delivers AIR to Linux platforms!

Adobe finally brings the AIR SDK to a variety of linux platforms. Handy if your home development network is Ubuntu based.

Full article here:

&lt;a href=&quot;http://www.theregister.co.uk/2008/12/18/adobe_air_linux/&quot; target=&quot;new_win&quot;&gt;
&lt;img src=&quot;http://www.mccran.co.uk/images/images//adobe_air.png&quot; border=&quot;0&quot;&gt;&lt;/a&gt;
				
				</description>
				
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Fri, 19 Dec 2008 15:30:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2008/12/19/Adobe-brings-AIR-to-Linux</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion - Flex remoting struct() case sensitivity</title>
				<link>http://www.mccran.co.uk/index.cfm/2008/7/1/ColdFusion--Flex-remoting-struct-case-sensitivity</link>
				<description>
				
				One of the more frequent data Objects that I pass from CF to Flex is the structure. I recently stumbled upon a case sensitivity issue in flex, that can be solved in CF with a slight change in code.
				 [More]
				</description>
				
				
				<category>Flex Remoting</category>
				
				<category>AIR</category>
				
				<category>RIA</category>
				
				<category>Flex</category>
				
				<pubDate>Tue, 01 Jul 2008 12:05:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2008/7/1/ColdFusion--Flex-remoting-struct-case-sensitivity</guid>
				
				
			</item>
			
		 	
			</channel></rss>