In the ActionScript code, you specify the
WSDL. The
getTemp
represents an input text field, and
To see the web service proxy assembly (with the .dll extension) that Flash Remoting creates, look
in your local assembly cache for a DLL with the same name as the web service. For the
Temperature web service, look for a DLL named TemperatureService.dll.
Calling ASP.NET assemblies from Flash
Using Flash Remoting, you can invoke .NET assembly files (with the .dll extension) from Flash.
In your ActionScript code, you use the fully qualified assembly or class file name in the
argument, and for the service function name, you use an assembly or class method
serviceName
name. On the server, you must place your DLL and class files in the local assembly cache.
Calling assemblies from Flash
In the class file, you specify the
namespace FlashGateway.IO, as the following C# example shows:
using System;
using FlashGateway.IO;
namespace FlashRemoting.EchoTests
{
public class EchoClass
{
public EchoClass()
{
///Public constructor... initialize any member fields here if need be.
}
public string echoString(string s)
{
return s;
}
}
}
In the ActionScript code, you use the namespace and public class name defined in the class file, as
the following example shows:
import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
var classService:Service = new Service(
"http://localhost/myASPApp/default.aspx",
null,
"FlashRemoting.EchoTests.EchoClass",
null,
null);
var pc:PendingCall = classService.echoString(input.text);
pc.responder = new RelayResponder(this, "echoString_Result",
serviceName
function maps to the web service method of the same name. Here,
tempDisplay
directive to reference the Flash Remoting assembly
using
argument with a URL that produces
represents a dynamic text field.
Calling ASP.NET assemblies from Flash
zip
159
Need help?
Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?