Groups | Blog | Home
all groups > macromedia flash flash remoting > january 2004 >

macromedia flash flash remoting : Problem with remoting


fragnrock
1/15/2004 5:14:29 PM
I've got a problem with remoting. I'm using flashMX pro 2004 and coldFusion's CFC. It's work great under FlashMX environment but it does'nt work when I publish my flash on my web server.

Source of my flash

// Include the required classes for Flash Remoting
#include "NetServices.as"

// Set up variable for the Flash Remoting URL
var myURL = "http://webdev/flashservices/gateway/";
// Set up variable for the Community MX wsdl descriptor file

// Connection hasn't been initialized; create connection and service objects
if (initialized == null) {
initialized = true;
NetServices.setDefaultGatewayUrl(myURL);
var myConnection_conn = NetServices.createGatewayConnection();

var myService = myConnection_conn.getService("tests.HelloWorld",this);

}

function sayHello_Result(result){
displayPane.text = "message : "+result;
}

function sayHello_Status(result){
displayPane.text = error.description;
}
displayPane.text = "waiting...";
myService.sayHello();




Source of my CFC (helloworld.cfc)


<cfcomponent>
<cffunction access="remote" name="sayHello" output="false" returntype="string" description="Retourne un message hello">
<cfreturn "Hello World">
</cffunction>
</cfcomponent>



------------------------------------------------------------------------------------------------------

My web site is stored on D:\www\mysite\ and coldfusion is on D:\coldfusionMX

helloworld.cfc is stored in D:\coldfusionMX\wwwroot\tests\ directory and it works fine when I play the movie in flashMX authoring environment. It's a bit strange isn't it? If I put it in D:\www\mysite\tests it won't work anymore under flashMX.

But whatever I do, it doesn't work at all when I publish the flash on my site.






J___
1/16/2004 2:20:28 PM
have you updated the flash remoting 2004 components for your server and flash app and recompiled?

fragnrock
1/16/2004 3:18:58 PM
I found the solution to my problem thanks to this technote:

http://www.macromedia.com/support/coldfusion/ts/documents/tn18307.htm

AddThis Social Bookmark Button