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 12-16-2003, 04:44 PM   #1
heyder
creative soloper
 
Join Date: Sep 2002
Posts: 43
Default Amp-php + Flash Mx 2004

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
heyder is offline   Reply With Quote
Old 12-17-2003, 04:39 PM   #2
SeanPaul72
Registered User
 
SeanPaul72's Avatar
 
Join Date: Jan 2003
Location: New Orleans
Posts: 420
Send a message via AIM to SeanPaul72 Send a message via Yahoo to SeanPaul72
Default try a relative path instead of an absolute path

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..
SeanPaul72 is offline   Reply With Quote
Old 12-28-2003, 07:28 AM   #3
mfalomir
Registered User
 
Join Date: Dec 2003
Location: Hermosillo, Mexico
Posts: 52
Default

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...
mfalomir is offline   Reply With Quote
Old 12-28-2003, 04:26 PM   #4
omnidogg
Registered User
 
Join Date: Dec 2003
Posts: 2
Default the method name changed in mx 2004

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
omnidogg 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:16 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.