Skip to main content
September 18, 2006
Question

Flash remoting

  • September 18, 2006
  • 1 reply
  • 196 views
Hello,
I would like to get a variable back using flash remoting. Below is the code I am using :

Action script :

#include "NetServices.as"
if(inited == null)
{
inited=true;
NetServices.setDefaultGatewayUrl(" http://localhost:8500/flashservices/gateway");
var connexion = NetServices.createGatewayConnection();
var myservice = connexion.getService("com.macromedia.test.toto", this);

myservice.toto({param1:1002});
}


.cfc :


<cfcomponent>

<cffunction name="toto" returnType="numeric" access="Remote">
<cfargument name="param1" type="numeric" required="yes">
<cfreturn param1>
</cffunction>

</cfcomponent>


.cfm :
<cfoutput>

<cfinvoke component="com.macromedia.test.toto" method="toto" returnvariable="valeur">
#valeur#
</cfoutput>


Serveur connexion works, but I get an error stating that the variable is not defined.
Thank you for your help.
This topic has been closed for replies.

1 reply

September 21, 2006
Have you had any progress on this? If not, let me know, I have had a lot of experience with CF and Flash.