macromedia flash flash remoting:
Hi hello everybody !!
First, sorry for my poor english, this isn't my mother tongue :)
Ok... I want to use the new FlashRemoting AS2 components and classes
with .Net assembly...
So I create a very simple assembly, with just one method who return a
"hello world" string. I add FlashGateway.dll reference to my project.
this is the code of my assembly :
using System;
using FlashGateway;
namespace ProjetTest.test
{
public class MyClass
{
public MyClass()
{
}
public string getString ()
{
return "hello world";
}
}
}
After, I made a new Directory, set up an aspx page who contains the
minimum code :
<%@ Page Language="C#" %>
<html>
<head>
</head>
<body>
</body>
</html>
and called "gateway.aspx"
After that, I create a sub directory called bin, and add my DLL into...
structure :
Root (directory)
--> gateway.aspx
--> bin (directory)
--------> ProjetTest.dll
--------> flashgateway.dll
I launch cassini webserver from the gateway.aspx. so the root directory
of the webserver is the Root directory of my structure.
I made a new fla, who contains the following code :
import mx.remoting.*;
import mx.rpc.*;
NetDebug.init ();
function onResults(r:ResultEvent) : Void {
trace (r);
}
function onError(fault:FaultEvent) : Void {
trace("There was a problem: " + fault.fault.faultstring);
trace("The faultcode is: " + fault.fault.faultcode);
trace("The detail: " + fault.fault.detail);
trace("The error class name is: " + fault.fault.type);
}
var s:Service = new Service ("http://localhost/gateway.aspx", null,
"ProjetTest.test.MyClass", null, null);
var pc:PendingCall = s.getString ();
pc.responder = new RelayResponder(this, "onResults", "onError" );
And when I compile my fla to test it, the connection is etablished, and
the call of the method too, but no return of any type... simply no return...
NetDebug trace of connection :
ConnectString: "http://localhost/gateway.aspx"
Date: (undefined)
ID de débogage: 0
Type d'événement: "Connect"
URL de l'animation: "file:///E|/Documents de Titouille/csharp/test/TEST.swf"
Protocole: "http"
Source: "Client"
Heure: (undefined)
NetDebug trace of method call :
Date: (undefined)
ID de débogage: 0
Type d'événement: "Call"
MethodName: "ProjetTest.test.MyClass.getString"
URL de l'animation: "file:///E|/Documents de Titouille/csharp/test/TEST.swf"
Protocole: "http"
Source: "Client"
Heure: (undefined)
Parameters (object #1)
......Aucune propriété
Before installing remoting AS2, I have tried the AS1 components for
remoting, last month, and all was correct, connection, call, return...
So if anyone can explain me who I'm lost (maybe the structure, the
gateway, ...), I will be very happy and can continue my developement.
Many thanks in advance for any solution, way, url, tutorial, ... :)