1 Reply Latest reply on Sep 20, 2006 10:18 PM by patweb

    Flash remoting

    bubble2006
      Hello,
      I would like to get a variable back using flash remoting. Below is the code I am using :

      Action script :
      [code]
      #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});
      }
      [/code]

      .cfc :

      [code]
      <cfcomponent>

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

      </cfcomponent>
      [/code]

      .cfm :
      [code]<cfoutput>
      <cfinvoke component="com.macromedia.test.toto" method="toto" returnvariable="valeur">
      #valeur#
      </cfoutput>
      [/code]

      Serveur connexion works, but I get an error stating that the variable is not defined.
      Thank you for your help.