PDA

View Full Version : Does Flash remoting not work with as 3.0


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();

Djjinn
05-21-2007, 01:34 AM
i am currently using Fluorine and having pretty good luck with it
http://fluorine.thesilentgroup.com/

it utilizes the NetConnection class, if you need the code i can post when i get back home tomorrow or you can PM me

there is also a post on this forum the describes amfphp with 3.0. I used that as my main base in getting Fluorine to work... The biggest thing to remember is making sure you use configure the webservice class to access remote calls from flash

johnkainn
05-23-2007, 09:22 AM
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();

johnkainn
05-23-2007, 09:22 AM
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();