johnkainn
05-20-2007, 01:11 PM
Hi,
I am trying to use Flash Remoting to connect to .Net.
In actionscript 2.0 it works fine, but if I copy the same code over to actionscript 3.0 file I get following error:
1172: Definition mx.data.components:RemotingConnector could not be found.
Is flash remoting not supported in actionscript 3.0?
Here below is the code I am using in Flash:
import mx.data.components.RemotingConnector;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
var asp_rc:RemotingConnector = new RemotingConnector();
asp_rc.gatewayUrl = "http://localhost:1734/pk1/gateway.aspx";
asp_rc.methodName = "test_asp";
asp_rc.serviceName = "pk1";
function gotResult(ev:Object) {
trace("Got Result - "+ev.target.results);
}
function gotStatus(stat:Object) {
trace("Error - "+stat.code+" - "+stat.data.faultstring);
}
asp_rc.addEventListener("result",gotResult);
asp_rc.addEventListener("status",gotStatus);
trace("Triggering...");
asp_rc.trigger();
I am trying to use Flash Remoting to connect to .Net.
In actionscript 2.0 it works fine, but if I copy the same code over to actionscript 3.0 file I get following error:
1172: Definition mx.data.components:RemotingConnector could not be found.
Is flash remoting not supported in actionscript 3.0?
Here below is the code I am using in Flash:
import mx.data.components.RemotingConnector;
import mx.remoting.debug.NetDebug;
NetDebug.initialize();
var asp_rc:RemotingConnector = new RemotingConnector();
asp_rc.gatewayUrl = "http://localhost:1734/pk1/gateway.aspx";
asp_rc.methodName = "test_asp";
asp_rc.serviceName = "pk1";
function gotResult(ev:Object) {
trace("Got Result - "+ev.target.results);
}
function gotStatus(stat:Object) {
trace("Error - "+stat.code+" - "+stat.data.faultstring);
}
asp_rc.addEventListener("result",gotResult);
asp_rc.addEventListener("status",gotStatus);
trace("Triggering...");
asp_rc.trigger();