<?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>rabidGadfly &#187; remoting</title>
	<atom:link href="http://rabidgadfly.com/category/remoting/feed/" rel="self" type="application/rss+xml" />
	<link>http://rabidgadfly.com</link>
	<description>Simple Solutions to Nagging Coding Problems</description>
	<lastBuildDate>Wed, 19 Oct 2011 13:43:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Is it possible to pass a structure to ColdFusion using Flash AS3 / Remoting</title>
		<link>http://rabidgadfly.com/2008/05/is-it-possible-to-pass-a-structure-to-coldfusion-using-flash-as3-remoting/</link>
		<comments>http://rabidgadfly.com/2008/05/is-it-possible-to-pass-a-structure-to-coldfusion-using-flash-as3-remoting/#comments</comments>
		<pubDate>Tue, 20 May 2008 14:57:15 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[coldFusion]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[amf]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[netconnection]]></category>
		<category><![CDATA[objectEncoding]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=64</guid>
		<description><![CDATA[UPDATE: This problem has been solved. The solution is after the post. I&#8217;ve posted on a few forums now with no results so I&#8217;m resorting to my own blog. What I&#8217;m trying to do is pass a structure to a ColdFusion component from Flash. I&#8217;ve tried using Array, Object, and Dictionary types but it keeps [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> This problem has been solved. The solution is after the post.</p>
<p>I&#8217;ve posted on a few forums now with no results so I&#8217;m resorting to my own blog. What I&#8217;m trying to do is pass a structure to a ColdFusion component from Flash. I&#8217;ve tried using Array, Object, and Dictionary types but it keeps failing with this error:</p>
<p>&#8220;Unknown object type tag (17)&#8221;</p>
<p>The error seems to be returned before the method is even reached suggesting that the cfc is rejecting the Remoting request altogether. I know the code is sound because I can change the structure to a string and get results back. I&#8217;ve also tried the Flash.Params method.</p>
<p>I&#8217;ve done a fair amount of research already, including studying <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=usingSalsaN_4.html">Adobe livedocs</a> which insists that it&#8217;s possible to do.</p>
<p>Here is my code:</p>
<pre><code>
loadData_btn.addEventListener(MouseEvent.MOUSE_DOWN, loadData)

var myService = new NetConnection()
myService.connect("http://localhost/flashservices/gateway/")

function loadData(evt:MouseEvent){
    var responder = new Responder(getTest_Result, onFault);
/* I've tried everything here including defining it as an Object and Dictionary. I also tried
defining it using dot notation and sending it as an object like so: {mystring:"hello"} */
	var mystruct:Array = new Array();
	mystruct["mystring"] = "hello";
	myService.call("com.mycomponent.test", responder, mystruct);
}

function getTest_Result(result){
    trace("success: "+ result);
}

function onFault( f){
	trace("There was a problem: " + f.description);
}
</code></pre>
<p>&#8230;and here&#8217;s my component function (I&#8217;ve tried with an argument type of &#8216;struct&#8217; as well as &#8216;any&#8217;):</p>
<pre><code>
<cffunction name="test" output="no" access="remote" returntype="string" >
	<cfargument name="argstruct" type="any" required="no" />
	<cfset mystr =arguments.argstruct["mystring"]>
	<cfreturn  mystr />
</cffunction>
</code></pre>
<p>Thanks in advance for any help!</p>
<p>rG</p>
<p><strong>SOLUTION:</strong> <em>After many hours of Googling, and much trial and error, I figured out how to make this work&#8230;and it&#8217;s a one line solution. Simply add myService.objectEncoding=0 before the myService.connect line at the top. It has to do with the way objects are serialized using AMF. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2008/05/is-it-possible-to-pass-a-structure-to-coldfusion-using-flash-as3-remoting/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to Setup AS2 Remoting With Flash CS3</title>
		<link>http://rabidgadfly.com/2007/10/how-to-setup-as2-remoting-with-flash-cs3/</link>
		<comments>http://rabidgadfly.com/2007/10/how-to-setup-as2-remoting-with-flash-cs3/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 13:04:17 +0000</pubDate>
		<dc:creator>rabidgadfly</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[remoting]]></category>

		<guid isPermaLink="false">http://www.rabidgadfly.com/?p=52</guid>
		<description><![CDATA[Boy, was this a bitch! I can&#8217;t take credit for this solution because I found it in a reply to a Adobe forum post (thank you jedders). I just wanted to re-produce it here a) As just another place to find it, b) So I know where the solution is when I&#8217;m looking for it [...]]]></description>
			<content:encoded><![CDATA[<p>Boy, was this a <strong><em>bitch</em></strong>! I can&#8217;t take credit for this solution because I found it in a reply to a <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&#038;catid=250&#038;threadid=1264156&#038;enterthread=y">Adobe forum post</a> (thank you jedders). I just wanted to re-produce it here  a) As just another place to find it, b) So I know where the solution is when I&#8217;m looking for it again, and c) Because jedders&#8217;s post missed a couple of files and I wanted a complete reference.</p>
<p>Why Adobe left the AS2 Remoting files out of the CS3 installation is beyond me. I work with a countless number of files that utilize AS2 remoting. I don&#8217;t have the time to convert them all to AS3 and I think it&#8217;s silly to keep Flash 8 on my machine simply because I have to compile files that utilize remoting.</p>
<p><span id="more-52"></span></p>
<p>So here, step by step, is what worked for me on Windows XP (another reply to the same thread stated that anyone running Vista should interpret C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\&#8230; as<br />
C:\Users\YOURUSERNAME\AppData\Local\&#8230;. Sorry Mac users, I have nothing against your OS, I just don&#8217;t know it):</p>
<p><strong>1.</strong> Copy Remoting and RPC Folders from your Documents and settings location TO FLASH CS3 LOCATION.</p>
<p>C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Classes\mx<br />
to<br />
C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\Classes\mx</p>
<p><strong>2.</strong> Copy Remoting.Fla From.</p>
<p>C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Libraries<br />
To<br />
C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\Libraries</p>
<p><strong>3.</strong> Copy NetConnection Debugger.swf and Service Browser.swf from.</p>
<p>C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\WindowSWF<br />
To<br />
C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\WindowSWF</p>
<p><strong>4.</strong> Copy NetConnection Debugger.swf and Service Browser.swf from or WindowSWF folder. <em><strong>Note that this is not the same step as the one above. The folders are different.</strong></em></p>
<p>C:\Program Files\Macromedia\Flash 8\en\First Run\WindowSWF<br />
To<br />
C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\WindowSWF</p>
<p><strong>5.</strong> Copy the Libraries Folder.</p>
<p>C:\Program Files\Macromedia\Flash 8\en\First Run<br />
to<br />
C:\Program Files\Adobe\Adobe Flash CS3\en\First Run</p>
<p><strong>6.</strong> Copy Remoting and RPC Folders from your Program Files location TO FLASH CS3 LOCATION.</p>
<p>C:\Program Files\Macromedia\Flash 8\en\First Run\Classes\mx<br />
To<br />
C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\Classes\mx</p>
<p><strong>7.</strong> Copy the RemotingConnector.swc from.</p>
<p>C:\Program Files\Macromedia\Flash 8\en\First Run\Components\Data Components<br />
to<br />
C:\Program Files\Adobe\Adobe Flash CS3\en\Configuration\Components\Data</p>
<p><strong>8.</strong> Copy DataRange.as, PageableList.as, and PageableData.as<br />
C:\Program Files\Macromedia\Flash 8\en\First Run\Classes\mx<br />
To<br />
C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\Classes\mx<br />
<strong>AND</strong><br />
C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Adobe\Flash CS3\en\Configuration\WindowSWF</p>
<p>If you&#8217;ve done all of that properly you should be able to publish AS2 files that utilize remoting using Flash CS3.</p>
<p>Thanks again to jedders!</p>
<p>-rG</p>
]]></content:encoded>
			<wfw:commentRss>http://rabidgadfly.com/2007/10/how-to-setup-as2-remoting-with-flash-cs3/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

