Groups | Blog | Home
all groups > macromedia flash flash remoting > february 2005 >

macromedia flash flash remoting : Passing Parameter to ColdFusion


AntGreene
2/28/2005 1:20:54 AM
:confused;
I am building my first dynamic site using FlashRemoting and ColdFusion and
have the problem below:

Flash ActionScript:
//customerProxy is the instance name of RemotingConnector component.
customerProxy.gatewayUrl="http://localhost:8500/flashservices/gateway";
customerProxy.serviceName="mysite.dbs.customer";
customerProxy.methodName="getCustomer";
customerProxy.params = "info@info.com"; //this is to search a customer who has
email address info@info.com.
customerProxy.trigger();

var oRsCustomerListener:Object = new Object();
oRsCustomerListener.result = function() {
trace(customerProxy.results.length);
}
customerProxy.addEventListener("result", oRsCustomerListener);

ColdFusion Component (customer.cfc):
<cfcomponent>
<cffunction name="getCustomer" access="remote" returntype="query">
<cfargument name="theEmail" required="true" type="string">
<cfquery name="qGetCustomer" datasource="myDataSource">
SELECT *
FROM customer
WHERE email = #Arguments.theEmail#
</cfquery>
<cfreturn qGetCustomer>
</cffunction>

Did I miss something?
sixlead
3/4/2005 5:05:03 PM
Try something like this to pass the parameter

this._parent.myReceiveWebServiceConnector.params = ['info@info.com'];
thedanster
3/9/2005 4:59:15 AM
Did the assigning of the params property as sixlead suggested work? I am trying to do something similar with a remotingConnector and I have had no luck.
AddThis Social Bookmark Button