| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
creative soloper
Join Date: Sep 2002
Posts: 43
|
I'm trying to use remoting in FLASH MX 2004 using AMF-PHP using the following script but... I'm getting the error listed under the code. Has anybody else had this issue?
// Include the NetServices.as file to allow Remoting #include "NetServices.as" // Uncomment the next line to include the NetDebug.as file if you want to enable // and use the NetConnection Debugger Panel. For deployment make sure you comment it out. #include "NetDebug.as" // // Initiliaze our gateway connection and our service if (inited == null) { inited = true; NetServices.setDefaultGatewayURL ("http://localhost/remoting/simple_gateway.php"); var conn = NetServices.createGatewayConnection (); var myService = conn.getService ("ams_data", this); } **Error** Scene=Scene 1, layer=Layer 3, frame=1:Line 13: There is no method with the name 'setDefaultGatewayURL'. NetServices.setDefaultGatewayURL ("http://localhost/remoting/simple_gateway.php"); Total ActionScript Errors: 1 Reported Errors: 1 |
|
|
|
|
|
#2 |
|
Registered User
|
heyder,
Iwas having plenty trouble with amfphp, until I changed my absolute path (which I'm sure was correct, to a relative path) You currently have an absolute path, make it relative and see if the code works. Last edited by SeanPaul72; 12-18-2003 at 10:36 PM.. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Dec 2003
Location: Hermosillo, Mexico
Posts: 52
|
Hi Heyder,
try this instead // Include the NetServices.as file to allow Remoting #include "NetServices.as" // Uncomment the next line to include the NetDebug.as file if you want to enable // and use the NetConnection Debugger Panel. For deployment make sure you comment it out. #include "NetDebug.as" // // Initiliaze our gateway connection and our service if (inited == null) { inited = true; var conn = NetServices.createGatewayConnection ("http://localhost/remoting/simple_gateway.php"); var myService = conn.getService ("ams_data", this); } and you will get no AS error... |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Dec 2003
Posts: 2
|
hi heyder,
the correct method name for setting the default gateway in mx 2004 is setDefaultGatewayUrl instead of setDefaultGatewayURL that will fix the current error you get but watch out because AMFPHP can be bear to work with for the casual scripter if youre just beginning i recommend working with 0.5.1 release until you get comfortable with it. its a little easier to work and less buggy than the 0.9 beta good luck |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|