Groups | Blog | Home
all groups > macromedia flash flash remoting > september 2007 >

macromedia flash flash remoting : Problem deploying - searchign for localhost


damian NO[at]SPAM gcoders.com
9/26/2007 10:34:31 PM
grrr. I hope someone can help because Flash remoting is really giving
me a headache :/
I have managed to get an example remoting application working on my
local machine. But when I deploy it to my web server the ineteraction
between Flash file and ASP. NET page doesn't seem to work any longer.

Mysteriously, If I try to open my flash file from another PC, just on
my own network, it also doesn't work. The c:\inetpub structure is the
same, and i've spent days fiddlin with the gatewayurl and servicename
in the hope that it would work.
The Flash remoting examples which come with Flash remoting work when
installed, but the Flash file doesn't compile (sample_ASP_GEN.fla),
throws an error on #include line, i've trierd import isntead, which
doesn't work, and the component toolkit is installed.

If I can't figure out how to get this darned hting to work today I may
have to try out using this XML way of passing data around..
thanks in advance
damian NO[at]SPAM gcoders.com
9/26/2007 10:37:55 PM

I sent my message too early, here's my example code:
When using firefox it says in the status bar "searching for
localhost", and IE says nothing.. ho hum


//imports the NetServices ActionScript file
import mx.remoting.*;
//#include "NetServices.as"
//if statement creates the connection to the remote service and
creates aservice object
if (inited == null)
{
inited = true;
NetServices.setDefaultGatewayUrl("http://localhost/flashremoting/
gateway.aspx"); // localhost
serviceConnection = NetServices.createGatewayConnection();
serviceObject = serviceConnection.getService("flashremoting",
this); //remoteService
}

//if the service function is successful, the _Result function of the
same nameexecutes
function helloWorldNet_Result(result)
{
messageDisplay.text = result;
}
//if the service function is unsucessful, the _Status function of the
same nameexecutes
function helloWorldNet_Status(result)
{
messageDisplay.text = result.description;
}
function testFunc(eventObj:Object) {
// ergerg.text = "Testing the title";
serviceObject.helloWorldNet();
}

// add the event listener for the button
sd.addEventListener("click", testFunc);

AddThis Social Bookmark Button