Home > AMFPHP, Flash Platform > Service class path for AMFPHP

Service class path for AMFPHP

January 27th, 2008

I am frequently asked how to call services that are in folders inside of the amfphp/services/ directory. To do this you just use dot notation on NetConnection.call method. If you download the amfphp examples I am going to use the HelloWorld example and place it into a subfolder.

On the server make a directory inside of of your amfphp/services/ folder:

amfphp/services/sub/

Upload or move the HelloWorld.php file into your new directory.

Open flash and open the Main.as file that goes with the example. Go to line 36 and change the call to have the folder name then a dot.

connection.call("sub.HelloWorld.say", responder, params);

You are now making calls to a sub directory inside your services folder!

AMFPHP, Flash Platform

  1. Freddy
    January 28th, 2008 at 11:36 | #1

    what AS3 Remoting Framework do you use usually? SSR? AS3 Lightweight?

  2. January 28th, 2008 at 12:12 | #2

    I actually have my own service locater class that I use inside of Flash. Looking at AS3 Lightweight it seems to be about the same. In flex I use RemoteObject in Caringorm.

  3. Gepattp
    January 28th, 2008 at 14:42 | #3

    I’m trying to set up amfphp so that the services directory is on the same level as the amfphp directory. I have configured my classpath accordingly in the gateway, but I only get the ‘ faultCode = “AMFPHP_CLASSPATH_NOT_FOUND” ‘ error when I use the ServiceBrowser. Is having the services dir on the same level (so not as a subdir) at all possible?

    by the way: the goal is to set up a central amfphp for multiple websites and only having a separate services folder and globals.php for every website

  4. January 28th, 2008 at 15:34 | #4

    make the classpath /../ and this will do the trick.

  5. Gepattp
    January 29th, 2008 at 03:58 | #5

    oh my god, just made a regular typo.. didn’t see it for hours. Thnx anyway Wade…
    I now have it set up for 14 websites and I can do 1 svn update of amfphp for all ;-)

  6. September 15th, 2008 at 23:28 | #6

    is just incredible the number of websites with the amfphp browser visible to anyone.

  7. June 9th, 2009 at 01:09 | #7

    amfphp = <3

    thank-you!

  1. No trackbacks yet.