PDA

View Full Version : [AS3] Remoting from .net?


danee987
04-03-2008, 08:45 PM
Hi guys I was wondering if one of you could help me understand how I write the connection to .net functions using as3? I followed a few tutorials but I'm stuck in how to target the page with the function.

The problem is that say my structure is this:

swf file location:http://www.domainname.com/folder1/folder2/folder2A/flash.swf

service location: http://www.domainname.com/folder1/folder2/folder2B/service.aspx

So when i want to call a function from the service how can I write it so that I go out one folder and then go into the other one??



connection.call("????",responder)



If anyone could help me I would really appreciate it.:confused:

danee987
04-04-2008, 05:21 PM
k well I got flash to find my web service but now I am getting this error:

Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.BadVersion
at calendarAS3_fla::Remoting_mc_2/makeCall()
at Calendar/::DoRemoting()
at Calendar$iinit()
at calendarAS3_fla::MainTimeline/calendarAS3_fla::frame1()

Does anyone know what causes this and why its happening?? Especially since my Actionscript 2.0 version of this same application works perfectly?

danee987
04-07-2008, 10:23 PM
can anyone help??:( sigh

vevmedia
09-30-2008, 08:49 PM
Did you ever find a solution to this. I am having the same problem and am slightly confused. Same thing, I tried calling my AMF function via AS2 no problems encountered...

V

Eric Schleeper
07-01-2009, 09:48 PM
You want to call a specific method in your service.

var aString:String= 'aStringAsAParam';
var connection:NetConnection = new NetConnection;
var responder:Responder = new Responder(onResult, onFault);
connection.connect('http://yourdomain.com/amfgateway');
connection.call("Service.yourMethod", responder, aString);

function onResult(result:Object):void
{
trace(result);
}
function onFault(fault:Object):void
{
trace(String(fault.description));
}