macromedia flash flash remoting:
Hi,
The flash remoting application does not display any output and it doesn't show any error either. I have a apache server with php and mysql running on a windows 2000 machine. I have checked the configuration of each of these and they seem to be working fine.
Flash Source
/*** Section 1 ***/
#include "NetServices.as"
/*** Section 2 ***/
// Assign myURL so it points to your Flash Remoting installation.
var myURL = "http://localhost/com/oreilly/frdg/gateway.php";
var myServicePath = "com.oreilly.frdg.HelloWorld";
/*** Section 3 ***/
myResult = new Object( );
myResult.onResult = function (data) {
trace("Data received from Server : " + data);
};
myResult.onStatus = function (info) {
trace("An error occurred : " + info.description);
};
//System.onStatus = myResult.onStatus;
/*** Section 4 ***/
var myServer = NetServices.createGatewayConnection(myURL);
var myService = myServer.getService(myServicePath, myResult);
myService.sayHello( );
gateway.php
<?php
/* File: gateway.php
Instantiates the Gateway for the HelloWorld Application */
require_once '/app/Gateway.php'; /* Require files */
$gateway = new Gateway( ); /* Create the gateway */
$gateway->setBaseClassPath('/services/com/oreilly/frdg');
/* Set the path to where the service lives */
$gateway->service( ); /* Start the service */
?>
HelloWorld.php
<?php
/* File: {SERVICES_CLASS_PATH}/com/oreilly/frdg/HelloWorld.php
provides the HelloWorld class used in Chapter 1. */
class HelloWorld {
function HelloWorld ( ) {
$this->methodTable = array(
'sayHello' => array(
'description' => 'Says Hello from PHP',
'access' => 'remote',
'arguments' => array ('arg1')
)
);
}
function sayHello ( ) {
return 'Hello World from PHP';
}
}
?>
Directory structure
gateway.php --> webroot\com\oreilly\frdg
HelloWorld.php --> webroot\flashservices\services\com\oreilly\frdg
Thanks,
Arjun