DEfusion
09-02-2004, 10:36 PM
I've set everything up as recommended. I tried the samples - but god knows what the hell is going on in that debugger thing.
This is the actionscript I have :
// include the classes - in the first frame
#include "Cabron.as"
trace('begin');
// create connector instance - once in a movie
_global.cc = new CabronConnector();
trace(cc);
// set the location of the gateway
cc.setGatewayURL("http://127.0.0.1/temp/phpflash/gateway");
trace(cc);
// define responder method
function helloMethod_Result(res){
trace('here - result');
//textArea.text = 'something';
//printr("Response:" + res);
}
// define error handler method
function helloMethod_Status(errmsg, errcode, interfaceMessage){
//textArea.text = interfaceMessage;
trace('shhhhhhhhhhhhhhhhh');
//printr("Error occured:" + interfaceMessage);
}
// create service object - every time you need a function/method from a different php file
var helloService = cc.getService("helloService",this);
trace(helloService);
// call the method of the service
helloService.helloMethod("World!");
trace(something);
//textArea.text = 'something else';
And here is what is shown in the output window :
begin
[object Object]
[object Object]
[object Object]
undefined
I can't tell whats not working right though - is it not setting up the service correctly and thus nothing else is working?
I've also tried phpObject tonight - but again with no luck. I'm not very familiar with actionscript I just want a simple way to get stuff from php, I tried something like this about a year ago & I got it working fine - I seem to remember that was phpObject & PHP 4.x. I'm now running PHP 5.0.1
Any help is greatly appreciated.
-D
This is the actionscript I have :
// include the classes - in the first frame
#include "Cabron.as"
trace('begin');
// create connector instance - once in a movie
_global.cc = new CabronConnector();
trace(cc);
// set the location of the gateway
cc.setGatewayURL("http://127.0.0.1/temp/phpflash/gateway");
trace(cc);
// define responder method
function helloMethod_Result(res){
trace('here - result');
//textArea.text = 'something';
//printr("Response:" + res);
}
// define error handler method
function helloMethod_Status(errmsg, errcode, interfaceMessage){
//textArea.text = interfaceMessage;
trace('shhhhhhhhhhhhhhhhh');
//printr("Error occured:" + interfaceMessage);
}
// create service object - every time you need a function/method from a different php file
var helloService = cc.getService("helloService",this);
trace(helloService);
// call the method of the service
helloService.helloMethod("World!");
trace(something);
//textArea.text = 'something else';
And here is what is shown in the output window :
begin
[object Object]
[object Object]
[object Object]
undefined
I can't tell whats not working right though - is it not setting up the service correctly and thus nothing else is working?
I've also tried phpObject tonight - but again with no luck. I'm not very familiar with actionscript I just want a simple way to get stuff from php, I tried something like this about a year ago & I got it working fine - I seem to remember that was phpObject & PHP 4.x. I'm now running PHP 5.0.1
Any help is greatly appreciated.
-D