fmdano schrieb:
[quoted text, click to view] > so, where is the net connection debugger?
> Can flash remoting i used with mx2004 still available when using the flash 8
> program? i am saving the file as a mx2004 file, but it cannot find:
>
> #include "NetServices.as"
> #include "NetDebug.as"
>
> because of this and not being able to find the net connection debugger, i
> cannot figure out what is wrong with my program
>
> thanks
>
> dan
>
hallo fmdano,
id did not use the new flash 8, but since mx2004 the
#include 'NetServices'
#include 'NetDebug.as'
are deprecated. With the new 2004 Remoting-Classes these recources are
wrapped in classes in the mx.remoting.debug package.
An easy sample class using amfPHP follows:
import mx.remoting.debug.*;
class TestService {
private var service:Service;
private var GATEWAY_URL:String =
"http://localhost/flash_php_test/gateway.php";
public function Test() {
//here is the init for the netdebugger
Netdebug.initialize();{
//init the service
service = new Service(GATEWAY_URL, new Log(), "Test", null, null);
}
//simple servicecall
public function helloWorld():Void {
var helloPc:PendingCall = this.service.helloWorld();
//set the handlers for
helloPc.responder = new RelayResponder(this, "onCallData", "onCallFault");
}
//handler when functioncall worked well
private function onCallData( re:ResultEvent ):Void {
trace("worked well");
}
//handler when functioncall did not work
private function onCallFault( fault:FaultEvent ):Void {
trace("fault");
}
}
hope this helps
jirgn