<?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>Penguinspeak &#187; Flex</title>
	<atom:link href="http://macmartine.com/blog/category/flex/feed" rel="self" type="application/rss+xml" />
	<link>http://macmartine.com/blog</link>
	<description>This is how I see it.</description>
	<lastBuildDate>Tue, 19 Oct 2010 00:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to loop through properties of a custom object/VO</title>
		<link>http://macmartine.com/blog/2009/11/how-to-loop-through-properties-of-a-custom-objectvo.html</link>
		<comments>http://macmartine.com/blog/2009/11/how-to-loop-through-properties-of-a-custom-objectvo.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 22:29:46 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=150</guid>
		<description><![CDATA[If you just have a plain ol boring object, you can loop through it with a basic for&#8230;in: var myObj:Object = {x:1, y:5}; for (var i:String in myObj) { trace(i + ": " + myObj[i]); } However, if you have a custom value object, that doesn&#8217;t quite work. But what you can do is use [...]]]></description>
			<content:encoded><![CDATA[<p>If you just have a plain ol boring object, you can loop through it with a basic for&#8230;in:</p>
<pre name="code" class="javascript">
var myObj:Object = {x:1, y:5};
for (var i:String in myObj)
{
    trace(i + ": " + myObj[i]);
}
</pre>
<p>However, if you have a custom value object, that doesn&#8217;t quite work. But what you can do is use describeType() to create an XMLList version on your VO.</p>
<pre name="code" class="javascript">

var vo : SearchVO = data.getBody() as SearchVO;
// create an XMLList version of the VO
var varList:XMLList = describeType(vo)..variable;

// loop through the property list
for(var i:int; i < varList.length(); i++){
    // output the property name and value
    trace(varList[i].@name+':'+ vo[varList[i].@name]);
}
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=How+to+loop+through+properties+of+a+custom+object%2FVO+http%3A%2F%2Fbit.ly%2F1MlKGw" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2009/11/how-to-loop-through-properties-of-a-custom-objectvo.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why is only one of my List (or Datagrid, Tree, etc.) rows selectable?</title>
		<link>http://macmartine.com/blog/2009/11/why-is-only-one-of-my-list-or-datagrid-tree-etc-rows-selectable.html</link>
		<comments>http://macmartine.com/blog/2009/11/why-is-only-one-of-my-list-or-datagrid-tree-etc-rows-selectable.html#comments</comments>
		<pubDate>Thu, 12 Nov 2009 16:57:29 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=148</guid>
		<description><![CDATA[I remember hitting this before &#8212; after binding some data to a DataGrid (or any ListBase subclass) no matter where I rolled over the DataGrid only the last row was being highlighted. After remembering that these ListBase classes rely on a unique id (uid) for each row/object, I started digging around and found that in [...]]]></description>
			<content:encoded><![CDATA[<p>I remember hitting this before &#8212; after binding some data to a DataGrid (or any ListBase subclass) no matter where I rolled over the DataGrid only the last row was being highlighted.<br />
After remembering that these ListBase classes rely on a unique id (uid) for each row/object, I started digging around and found that in my case, I was binding to VO&#8217;s which I had given a &#8216;uid&#8217; property. This was interfering simply because I hadn&#8217;t yet hooked up that uid property so it wasn&#8217;t yet containing a unique id. So every row had the same unique id causing the DataGrid to essentially think it had only one row.<br />
There are definitely other scenarios when something similar would happen. There&#8217;s more info <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=about_dataproviders_8.html">here</a>.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Why+is+only+one+of+my+List+%28or+Datagrid%2C+Tree%2C+etc.%29+rows+selectable%3F+http%3A%2F%2Fbit.ly%2F2lBg4Z" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2009/11/why-is-only-one-of-my-list-or-datagrid-tree-etc-rows-selectable.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Associative array of U.S. state codes</title>
		<link>http://macmartine.com/blog/2009/11/associative-array-of-u-s-state-codes.html</link>
		<comments>http://macmartine.com/blog/2009/11/associative-array-of-u-s-state-codes.html#comments</comments>
		<pubDate>Mon, 02 Nov 2009 16:07:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=139</guid>
		<description><![CDATA[Just in case it&#8217;ll save anyone some time some day&#8230; var _stateCodes : Array = new Array(); _stateCodes["AL"] = "Alabama"; _stateCodes["AK"] = "Alaska"; _stateCodes["AS"] = "American Somoa"; _stateCodes["AZ"] = "Arizona"; _stateCodes["AR"] = "Arkansas"; _stateCodes["CA"] = "California"; _stateCodes["CO"] = "Colorado"; _stateCodes["CT"] = "Connecticut"; _stateCodes["DE"] = "Delaware"; _stateCodes["DC"] = "District Of Columbia"; _stateCodes["FM"] = "Federated States of [...]]]></description>
			<content:encoded><![CDATA[<p>Just in case it&#8217;ll save anyone some time some day&#8230;</p>
<pre name="code" class="xml">

			var _stateCodes : Array = new Array();
			_stateCodes["AL"] = "Alabama";
			_stateCodes["AK"] = "Alaska";
			_stateCodes["AS"] = "American Somoa";
			_stateCodes["AZ"] = "Arizona";
			_stateCodes["AR"] = "Arkansas";
			_stateCodes["CA"] = "California";
			_stateCodes["CO"] = "Colorado";
			_stateCodes["CT"] = "Connecticut";
			_stateCodes["DE"] = "Delaware";
			_stateCodes["DC"] = "District Of Columbia";
			_stateCodes["FM"] = "Federated States of Micronesia";
			_stateCodes["FL"] = "Florida";
			_stateCodes["GA"] = "Georgia";
			_stateCodes["GU"] = "Guam";
			_stateCodes["HI"] = "Hawaii";
			_stateCodes["ID"] = "Idaho";
			_stateCodes["IL"] = "Illinois";
			_stateCodes["IN"] = "Indiana";
			_stateCodes["IA"] = "Iowa";
			_stateCodes["KS"] = "Kansas";
			_stateCodes["KY"] = "Kentucky";
			_stateCodes["LA"] = "Lousiana";
			_stateCodes["ME"] = "Maine";
			_stateCodes["MH"] = "Marshall Islands";
			_stateCodes["MD"] = "Maryland";
			_stateCodes["MA"] = "Massachussetts";
			_stateCodes["MI"] = "Michigan";
			_stateCodes["MN"] = "Minnesota";
			_stateCodes["MS"] = "Mississippi";
			_stateCodes["MO"] = "Missouri";
			_stateCodes["MT"] = "Montana";
			_stateCodes["NE"] = "Nebraska";
			_stateCodes["NV"] = "Nevada";
			_stateCodes["NH"] = "New Hampshire";
			_stateCodes["NJ"] = "New Jersey";
			_stateCodes["NM"] = "New Mexico";
			_stateCodes["NY"] = "New York";
			_stateCodes["NC"] = "North Carolina";
			_stateCodes["ND"] = "North Dakota";
			_stateCodes["MP"] = "Northern Mariana Islands";
			_stateCodes["OH"] = "Ohia";
			_stateCodes["OK"] = "Oklahoma";
			_stateCodes["OR"] = "Oregon";
			_stateCodes["PW"] = "Palau";
			_stateCodes["PA"] = "Pennsylvania";
			_stateCodes["PR"] = "Puerto Rico";
			_stateCodes["RI"] = "Rhode Island";
			_stateCodes["SC"] = "South Carolina";
			_stateCodes["SD"] = "South Dakota";
			_stateCodes["TN"] = "Tennessee";
			_stateCodes["TX"] = "Texas";
			_stateCodes["UT"] = "Utah";
			_stateCodes["VT"] = "Vermont";
			_stateCodes["VI"] = "Virgin Islands";
			_stateCodes["VA"] = "Virginia";
			_stateCodes["WA"] = "Washington";
			_stateCodes["WV"] = "West Virginia";
			_stateCodes["WI"] = "Wisconsin";
			_stateCodes["WY"] = "Wyoming";
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Associative+array+of+U.S.+state+codes+http%3A%2F%2Fbit.ly%2FExMOj" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2009/11/associative-array-of-u-s-state-codes.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Embedding fonts in Flex 4</title>
		<link>http://macmartine.com/blog/2009/10/embedding-fonts-in-flex-4.html</link>
		<comments>http://macmartine.com/blog/2009/10/embedding-fonts-in-flex-4.html#comments</comments>
		<pubDate>Sat, 24 Oct 2009 17:16:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=76</guid>
		<description><![CDATA[In Flex 3 I created a component where I needed to embed the fonts. I did so with: [Embed(source='assets/fonts/ARIALBD.TTF', fontName='tabfont', fontWeight='bold')] Until Flex 4 halo components use Flash Player 10 FTE based text (remembering that FTE is only compatible with CFF embedded fonts), you’ll have to also specify embedAsCFF=’false’ because the legacy Flash Player TextField [...]]]></description>
			<content:encoded><![CDATA[<p>In Flex 3 I created a component where I needed to embed the fonts. I did so with:</p>
<pre name="code" class="css">
[Embed(source='assets/fonts/ARIALBD.TTF', fontName='tabfont', fontWeight='bold')]
</pre>
<p>Until Flex 4 halo components use Flash Player 10 FTE based text (remembering that FTE is only compatible with CFF embedded fonts), you’ll have to also specify embedAsCFF=’false’ because the legacy Flash Player TextField based text cannot use CFF embedded fonts.</p>
<p>Additionally Spark skins for halo components now use the plain font instead of bold.</p>
<p>So now, to do the same in Flex 4, it&#8217;s:</p>
<pre name="code" class="css">
[Embed(source='assets/fonts/ARIAL.TTF', embedAsCFF='false', fontName='tabfont')]
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Embedding+fonts+in+Flex+4+http%3A%2F%2Fbit.ly%2F3eu6EJ" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2009/10/embedding-fonts-in-flex-4.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails extension for Flex 4</title>
		<link>http://macmartine.com/blog/2009/10/ruby-on-rails-extension-for-flex-4.html</link>
		<comments>http://macmartine.com/blog/2009/10/ruby-on-rails-extension-for-flex-4.html#comments</comments>
		<pubDate>Mon, 19 Oct 2009 18:42:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=73</guid>
		<description><![CDATA[http://dcdror.riaforge.org/]]></description>
			<content:encoded><![CDATA[<p>http://dcdror.riaforge.org/</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Ruby+on+Rails+extension+for+Flex+4+http%3A%2F%2Fbit.ly%2F6gdr9" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2009/10/ruby-on-rails-extension-for-flex-4.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actionscript 3- Vector to Array</title>
		<link>http://macmartine.com/blog/2009/02/actionscript_3_vector_to_array.html</link>
		<comments>http://macmartine.com/blog/2009/02/actionscript_3_vector_to_array.html#comments</comments>
		<pubDate>Tue, 10 Feb 2009 20:16:04 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=37</guid>
		<description><![CDATA[There&#8217;s currently no way to convert a Vector to an Array (or ArrayCollection), so here&#8217;s a simple util that&#8217;ll do it. Accepts any type within the Vector, so the parameter is just an Object, then we convert it back to a vector before the Array conversion. Phew. public static function VectorToArray( v:Object ):Array { var [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s currently no way to convert a Vector to an Array (or ArrayCollection), so here&#8217;s a simple util that&#8217;ll do it. Accepts any type within the Vector, so the parameter is just an Object, then we convert it back to a vector before the Array conversion. Phew.</p>
<pre name="code" class="java">
public static function VectorToArray( v:Object ):Array
{
    var vec : Vector.<object> = Vector.<object>(v);
    var arr : Array = new Array()
    for each( var i : Object in vec ) {
        arr.push(i);
    }
    return arr;
}
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Actionscript+3-+Vector+to+Array+http%3A%2F%2Fbit.ly%2F2HXX2" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2009/02/actionscript_3_vector_to_array.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Crossdomain.xml files in Rails projects</title>
		<link>http://macmartine.com/blog/2008/04/crossdomain_xml_files_in_rails.html</link>
		<comments>http://macmartine.com/blog/2008/04/crossdomain_xml_files_in_rails.html#comments</comments>
		<pubDate>Tue, 08 Apr 2008 13:44:35 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=33</guid>
		<description><![CDATA[Usually when you need to allow a swf on one server access to data on another domain you would put a crossdomain.xml file in the root folder of that server. I&#8217;ve found one exception which is if you are making a call to Rails the crossdomain.xml file to the &#8216;public&#8217; folder of your Rails project.]]></description>
			<content:encoded><![CDATA[<p>Usually when you need to allow a swf on one server access to data on another domain you would put a crossdomain.xml file in the root folder of that server.<br />
I&#8217;ve found one exception which is if you are making a call to Rails the crossdomain.xml file to the &#8216;public&#8217; folder of your Rails project.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Crossdomain.xml+files+in+Rails+projects+http%3A%2F%2Fbit.ly%2F2gb2SZ" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2008/04/crossdomain_xml_files_in_rails.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex and ColdFusion: RemoteObjects and WebServices</title>
		<link>http://macmartine.com/blog/2008/04/flex_and_coldfusion_remoteobje.html</link>
		<comments>http://macmartine.com/blog/2008/04/flex_and_coldfusion_remoteobje.html#comments</comments>
		<pubDate>Wed, 02 Apr 2008 16:33:57 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=31</guid>
		<description><![CDATA[Once you have a ColdFusion CFC you can call it&#8217;s methods with a RemoteObject or via a WebService. RemoteObjects are usually preferred for their performance speed. Here we&#8217;ll create a super basic example of calling a CFC from both a WebService and a RemoteObject. The application will simply let you enter your name, click a [...]]]></description>
			<content:encoded><![CDATA[<p>Once you have a ColdFusion CFC you can call it&#8217;s methods with a RemoteObject or via a WebService.<br />
RemoteObjects are usually preferred for their <a href="http://www.themidnightcoders.com/blog/2007/03/flex-remoteobject-vs-webservice.html">performance speed</a>.<br />
<br/><br/><br />
Here we&#8217;ll create a super basic example of calling a CFC from both a WebService and a RemoteObject. The application will simply let you enter your name, click a button, call the CFC and return a welcome message including your name.<br />
<br/><br/></p>
<p><span id="more-31"></span><br />
To set up our examples, let create a most basic CFC. Let&#8217;s call this file NEWCFComponent.cfc and this&#8217;ll be it&#8217;s contents:<br />
<br/><br/><br />
<textarea rows="10" cols="60"><br />
<cfcomponent displayname="CF_Service" output="false"><br />
<cffunction name="WelcomeMsg" access="remote" returntype="string"><br />
<cfargument name="name" type="string" required="yes"><br />
<cfreturn "YO, #name#!"><br />
</cffunction><br />
</cfcomponent><br />
</textarea><br />
<br/><br/><br />
You can see this simply takes the #name# variable that it retrieves and returns the welcome message &#8220;Yo, #name#!&#8221;.<br />
<br/><br/><br />
Okay, let&#8217;s first call this with a WebService. Just create a basic local Flex project.<br />
Here&#8217;s the main application for that project:<br />
<br/><br/><br />
<textarea rows="25" cols="60"><br />
<?xml version="1.0" encoding="utf-8"?><br />
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><br />
<mx:Script><br />
<![CDATA[<br />
import mx.rpc.events.FaultEvent;<br />
import mx.rpc.Fault;<br />
import mx.rpc.events.ResultEvent;<br />
private function onResult( e : ResultEvent ) :void<br />
{<br />
msg.text = e.result.toString();<br />
}<br />
private function onFault( e : FaultEvent ) :void<br />
{<br />
trace( 'Oops!' );<br />
}<br />
]]&gt;<br />
</mx:Script><br />
<mx:WebService id="ws"<br />
wsdl="http://<server-name-or-IP>:8500/cf/CF_Service/NewCFComponent.cfc?wsdl&#8221;<br />
showBusyCursor=&#8221;true&#8221;><br />
<mx:operation name="WelcomeMsg"<br />
result="onResult(event)"<br />
fault="onFault(event)"><br />
<mx:request xmlns=""><br />
<name><br />
{_name.text}<br />
</name><br />
</mx:request><br />
</mx:operation><br />
</mx:WebService><br />
<mx:Button x="284" y="10" label="Get Welcome Message." click="ws.WelcomeMsg.send()"/><br />
<mx:TextInput id="msg" x="681" y="10"/><br />
<mx:TextInput id="_name" x="116" y="10"/><br />
<mx:Label x="10" y="12" text="Enter your name:"/><br />
</mx:Application><br />
</textarea><br />
<br/><br/><br />
Modify the &#8216;wsdl&#8217; attribute of the WebService tag as necessary to point to your CF server.<br />
<br/><br/><br />
That&#8217;s it! Now Run the Flex app, enter your name, click the button and see your welcome message!<br />
<br/><br/><br />
Now let&#8217;s do the same thing but use a RemoteObject.<br />
<br/><br/><br />
Create a Flex Project and in the Flex Project Wizard choose &#8216;ColdFusion&#8217; for the server type and &#8216;ColdFusion Flash Remoting&#8217;. Point the &#8216;Web root&#8217; and &#8216;Root URL&#8217; to your CF server.<br />
<br/><br/><br />
Use the same contents for the Flex application as above except remove the WebService tag and all it&#8217;s contents, and put this in it&#8217;s place:<br />
<br/><br/><br />
<textarea rows="5" cols="60"><br />
<mx:RemoteObject id="ws" destination="ColdFusion" source="cf.CF_Service.NewCFComponent"><br />
<mx:method name="WelcomeMsg" result="onResult(event)" fault="onFault(event)"/><br />
</mx:RemoteObject><br />
</textarea><br />
<br/><br/><br />
The &#8216;destination&#8217; is the remote destination as defined in remoting-config.xml (located in the <cf-server-root>/WEB-INF/flex directory). &#8216;ColdFusion&#8217; is a pre-defined, built-in destination.<br />
The &#8216;source&#8217; attribute should point to the location of your CFC starting at the server root. Note that this does not include the CFC extension, just the name of the CFC.<br />
<br/><br/><br />
Go ahead and run the app and it should behave just the same as the WebService version we created above, but maybe faster.<br />
<br/><br/><br />
If you want to create you own destination you can do that easily. Open remoting-config.xml (located in the <cf-server-root>/WEB-INF/flex directory and add this destination:<br />
<br/><br/><br />
<textarea rows="25" cols="60"><br />
<destination id="cfRemotingExample"><br />
<channels><br />
<channel ref="my-cfamf"/><br />
</channels></p>
<properties>
<source>cf.CF_Service.NewCFComponent</source><br />
<!-- define the resolution rules and access level of the cfc being invoked --><br />
<access><br />
<!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. --><br />
<use-mappings>false</use-mappings><br />
<!-- allow "public and remote" or just "remote" methods to be invoked --><br />
<method-access-level>remote</method-access-level><br />
</access></p>
<property-case>
<!-- cfc property names --><br />
<force-cfc-lowercase>false</force-cfc-lowercase><br />
<!-- Query column names --><br />
<force-query-lowercase>false</force-query-lowercase><br />
<!-- struct keys --><br />
<force-struct-lowercase>false</force-struct-lowercase>
</property-case>
</properties>
</destination><br />
</textarea><br />
<br/><br/><br />
The &#8216;source&#8217; attribute should point to the location of your CFC starting at the server root. This should be identical to the &#8216;source&#8217; attribute you had in your RemoteObject tag.<br />
<br/><br/><br />
Now a couple quick modifications to the RemoteObject and we&#8217;re good to go:<br />
<br/><br/><br />
<textarea rows="5" cols="60"><br />
<mx:RemoteObject id="ws" destination="cfRemotingExample" showBusyCursor="true"><br />
<mx:method name="WelcomeMsg" result="onResult(event)" fault="onFault(event)"/><br />
</mx:RemoteObject><br />
</textarea><br />
<br/><br/><br />
Notice we just changed the &#8216;destination&#8217; attribute to point to our new destination name, and we removed the &#8216;source&#8217; attribute because we included that in the <source> of our custom destination in remoting.config.xml.<br />
For now we&#8217;ll just use the default remote destination configured in remoting-config.xml (located in the <cf-server-root>/WEB-INF/flex directory)</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Flex+and+ColdFusion%3A+RemoteObjects+and+WebServices+http%3A%2F%2Fbit.ly%2F1T1ZPs" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2008/04/flex_and_coldfusion_remoteobje.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adobe Online Developer Week</title>
		<link>http://macmartine.com/blog/2008/03/adobe_online_developer_week.html</link>
		<comments>http://macmartine.com/blog/2008/03/adobe_online_developer_week.html#comments</comments>
		<pubDate>Mon, 24 Mar 2008 14:42:00 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=29</guid>
		<description><![CDATA[Join us for the Adobe Online Developer Week which already under way! http://adobe.com/go/2008_developer_week There are a bunch of cool sessions about Flex, AIR, LCDS and more&#8230;]]></description>
			<content:encoded><![CDATA[<p>Join us for the Adobe Online Developer Week which already under way!<br />
<a href="http://adobe.com/go/2008_developer_week">http://adobe.com/go/2008_developer_week</a><br />
There are a bunch of cool sessions about Flex, AIR, LCDS and more&#8230;</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Adobe+Online+Developer+Week+http%3A%2F%2Fbit.ly%2F4fFlMM" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2008/03/adobe_online_developer_week.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 3 and AIR 1.0 released!</title>
		<link>http://macmartine.com/blog/2008/02/flex_3_and_air_1_0_released.html</link>
		<comments>http://macmartine.com/blog/2008/02/flex_3_and_air_1_0_released.html#comments</comments>
		<pubDate>Mon, 25 Feb 2008 16:39:10 +0000</pubDate>
		<dc:creator>99miles</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://macmartine.com/blog/?p=28</guid>
		<description><![CDATA[Check &#8216;em out! http://www.adobe.com/products/flex/ http://www.adobe.com/products/air/ And here&#8217;s a good New York Times article about AIR: Adobe Blurs Lines Between PC and Web]]></description>
			<content:encoded><![CDATA[<p>Check &#8216;em out!<br />
<a href="http://www.adobe.com/products/flex/">http://www.adobe.com/products/flex/</a><br />
<a href="http://www.adobe.com/products/air/">http://www.adobe.com/products/air/</a><br />
And here&#8217;s a good New York Times article about AIR: <a href="http://www.nytimes.com/2008/02/25/technology/25adobe.html?ref=technology">Adobe Blurs Lines Between PC and Web</a></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Flex+3+and+AIR+1.0+released%21+http%3A%2F%2Fbit.ly%2F1h4F8x" title="Post to Twitter"><img class="nothumb" src="http://macmartine.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://macmartine.com/blog/2008/02/flex_3_and_air_1_0_released.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

