Zurück   Flashforum > Flash und Server > Flash Remoting

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 23-07-2006, 13:20   #1 (permalink)
Neuer User
 
Registriert seit: Jan 2005
Beiträge: 6
openamf mit flash mx und as1.0

Hallo,
ich arbeite für die Uni gerade an einem Projekt mit Flash Remoting. Ich benutze Flash MX. Ich habe leider nur Tutorials zu AS 2.0 gefunden. Jetzt ist mein Problem, folgenden Code auf AS1.0 zu übertragen:

----------------------------------------
import mx.remoting.Service;
import mx.services.Log;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;
import mx.remoting.debug.NetDebug

NetDebug.initialize();

// initialize the Logger
var myLogger : Log = new Log (Log.DEBUG, "logger1" );

// override the default log handler
myLogger.onLog = function (message : String ) : Void {
trace ("myLogger-->>>" + message );
}

//Create the service
myService = new Service ("http://localhost:8080/helloworld/gateway", myLogger, "com.flashdb.services.HelloWorld", null, null);

//on Data handler
function onEchoData (msg : ResultEvent){
mx.remoting.debug.NetDebug.trace ({level : "Debug", message : "onCategoryData" });
show.text = msg.result
}

//on Error handler
function onEchoFault (rs : ResultEvent){
mx.remoting.debug.NetDebug.trace ({level : "None", message : "There was a problem: " + fault.fault.faultstring });
}

//Buttons callbacks
callButton.onPress = function () {
//create the remoting call
var pc : PendingCall = myService.makeEcho("Hello World!");
pc.responder = new RelayResponder (this._parent, "onEchoData",
"onEchoFault" );
}

//just clear the textfield
clearButton.onPress = function (){
show.text = "";
}

stop ();

----------------------------------------

Bisher weiß ich nur, dass ich statt der imports ein #include nehmen muss.
Vielleicht kann mir jemand den Code übersetzen? Leider komme ich nicht an eine neuere Flash-Version.

Danke!
jjds ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 03:13 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele