Answered
Can't make a Call to main.asc
Okay, I've got something simple going on but I can't see it.
I am trying to add a heartbeat function to main.asc so that my
client apps can regularly detect a connection. But I can't get the
call to work.
Here's the code from main.asc:
Client.prototype.heartbeat = function()
{
trace("Heartbeat tapped");
return "HI!";
}
Here's the call from the client:
private function ConnectionTest ()
{
var rtn;
rtn= m_connection.call( "heartbeat" );
if (rtn != "HI!") {
Alert.show("Lost heartbeat");
}
}
I'm following other examples in the code that work. I get no response from main and the trace function in main doesn't print in the server admin page, where I expect to see it. Can anyone see what's wrong?
Here's the code from main.asc:
Client.prototype.heartbeat = function()
{
trace("Heartbeat tapped");
return "HI!";
}
Here's the call from the client:
private function ConnectionTest ()
{
var rtn;
rtn= m_connection.call( "heartbeat" );
if (rtn != "HI!") {
Alert.show("Lost heartbeat");
}
}
I'm following other examples in the code that work. I get no response from main and the trace function in main doesn't print in the server admin page, where I expect to see it. Can anyone see what's wrong?
