Skip to main content
March 20, 2007
Question

Flash Remoting not working

  • March 20, 2007
  • 2 replies
  • 649 views
Ok, so I tried the hello world example below and still can't get it to work. When I use cfinvloke to test it works via web browser.

http://www.adobe.com/devnet/coldfusion/articles/startremoting.html

Here is my Code:

import mx.remoting.*; // I switched to this instead of the old #include in the example.

function Result()
{
//receives data returned from the method
this.onResult = function(result){
trace("Data received from server : " + result);
}

this.onStatus = function(error){
trace("Error : " + error.description);
}
}

NetServices.setDefaultGatewayUrl(" http://localhost:8500/flashservices/gateway");
var gw = NetServices.createGatewayConnection();
var server = gw.getService("com.macromedia.test.HelloWorld", new Result());
server.sayHello();

I am running the CF Sever 7,0,2,142559 on IIS.

I have a the HelloWorld.cfc file in the wwwroot/com/macromedia/test
directory and I am the calling the .swf file after it is published.

When I try to view it through the browser or flash 8 I just get a blank screen.

Can someone please help me with this. I have been working on this all day and am about to throw in the towel. I'm sure this is something simple.

Thanks
Dave
This topic has been closed for replies.

2 replies

Inspiring
June 26, 2007
might change the trace's to alert's.

I found the people at AsFusion to be particularly knowledgeable about the subject of Flash Remoting. The Realestate example of theirs is wonderful.
June 19, 2007
I'm facing the same issues, try putting your helloworld.cfc in the c:/cfusionMX7/wwwroot/ folder directly. I don't understand why though, can someone please explain to me why does the actual .cfc files have to be in that folder? Why can't I map them to another location??