Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Remoting

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-23-2003, 11:07 AM   #1
jmdoczy
Registered User
 
Join Date: Oct 2003
Posts: 3
Default flash remoting

I am trying to use flash remoting with the amfphp component. I copied a fairly easy example from this site. (talkback example) -- the problem I seem to be having is this: in the example mulitple calls are made to various methods of the object talkback. These calls occur consecutively. When I attempt to run the flash movie I get an error saying that the class was not found or known to the gateway. However, if I only run one call the movie executes perfectly. Also, if I create a new connection before each call the movie works, returning answers in the reverse order. -- So I guess my question is, --->> what could I have incorrectly set up.

thanks,

jmdoczy


[EDIT/CyanBlue]
Moved to the Server Integration - Flash MX Remoting
Please state what your working environment is and
please post in the right forum
[/EDIT]

Last edited by CyanBlue; 10-23-2003 at 03:24 PM..
jmdoczy is offline   Reply With Quote
Old 10-23-2003, 05:37 PM   #2
jmdoczy
Registered User
 
Join Date: Oct 2003
Posts: 3
Default

local environment - Apache server, PHP, OS: windows XP pro.
jmdoczy is offline   Reply With Quote
Old 10-23-2003, 05:46 PM   #3
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

Quite possibly a scope problem, where is the actionscript you tried?
freddycodes is offline   Reply With Quote
Old 10-23-2003, 09:18 PM   #4
jmdoczy
Registered User
 
Join Date: Oct 2003
Posts: 3
Default

#include "NetServices.as"
#include "NetDebug.as"


// where jmdoczy is set as my localhost
path = "http://jmdoczy/flashservices/gateway.php"

NetServices.setDefaultGatewayURL(path);
serverConn = NetServices.createGatewayConnection();
class = serverConn.getService("talkback", this);

function returnString_Result(result) {
traceT("Got result \""+result+"\" of type "+typeof (result));
}
function returnNumber_Result(result) {
traceT("Got result \""+result+"\" of type "+typeof (result));
}
function returnArray_Result(result) {
traceT("Got result \""+result+"\" of type "+typeof (result)+
" which contained the following:\n");
for (item in result) {
traceT(item+": "+result[item]);
}
}

traceT("Calling returnString");
class.returnString("Flash Remoting is groovy");

traceT("Calling returnNumber");
class.returnNumber(50);

traceT("Calling returnArray");
test = new Object();
test.foo = "bar";

class.returnArray(test);

function traceT (str){
textField.text += str+newline;
}
jmdoczy is offline   Reply With Quote
Reply


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 08:34 PM.


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