Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-29-2005, 11:54 AM   #1
Registered User
Join Date: Apr 2005
Posts: 3
Unhappy help!error in result handlers

Hi everybody,

I'm just started studying on amfphp. I had followed a tutorial, but the output is not as axpected. Somehow the result handlers is not being executed.

Here is the link for installing amfphp remoting tutorial

I'd done some researched and I found that I had correctly installed the amfphp and the php file. The other possibly problem would be on the script. But I couldn't find out what's wrong with the script.

here is the flash file code:
// Include files necessary for Remoting debugging and coding
#include "NetDebug.as"
#include "NetServices.as"

// Establish connection to PHP Remoting
conn = NetServices.createGatewayConnection();

// Retrieve service
talkback = conn.getService("talkback", this);

// Define result handling code ---->this one seems not being executed
function returnString_Result(result) {
trace("Got result \""+result+"\" of type "+typeof (result));
function returnNumber_Result(result) {
trace("Got result \""+result+"\" of type "+typeof (result));
function returnArray_Result(result) {
trace("Got result \""+result+"\" of type "+typeof (result)+" which contained the following:");
for (item in result) {
trace(" "+item+": "+result[item]);

// Call some functions
trace("Calling returnString");
talkback.returnString("Flash Remoting is groovy");
trace("Calling returnNumber");
trace("Calling returnArray");
test = new Object();
test.foo = "bar";

I'd used the NetConnection debugger already and it showed that the connection and 3 called handler but no result has been returned.
ConnectString: "http://localhost/test_remoting/simple_gateway.php"
MethodName: "talkback.returnString"
Parameters (object #2)
.....[0]: "Flash Remoting is groovy"
MethodName: "talkback.returnNumber"
Parameters (object #2)
.....[0]: 50
MethodName: "talkback.returnArray"
Parameters (object #2)
.....[0] (object #3)
..........foo: "bar"

any help would be appreciated


vsiany is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:31 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.