Código :
capturaRespuesta.enviar_Result = function(data) {
trace("Dato recibido del servidor: "+data);
};2ª He hecho todo el tuto de flash remoting a raja tabla pero no me devuelve la respuesta del server
3ª si alguien me puede ayudar por toy cao ahora mismo, ta todo bien pero lo dicho no devuelve respuesta
codigo as 2.0 el q uso:
Código :
import mx.remoting.NetServices;
import mx.remoting.Connection;
mx.remoting.debug.NetDebug.initialize();
capturaRespuesta = new Object();
capturaRespuesta.enviar_Result = function(data) {
trace("Dato recibido del servidor: "+data);
};
capturaRespuesta.onStatus = function(data) {
trace("Ocurrio un error.");
trace("Detalles del error: "+data.description);
};
NetServices.setDefaultGatewayUrl("http://www.geonimales.com/flashservices/gateway.php");
conn = NetServices.createGatewayConnection();
serv = conn.getService("hola", capturaRespuesta);
serv.enviar("Probando");
codigo servicio webs:
Código :
<?php
class hola {
function hola() {
$this->methodTable = array(
"enviar" => array(
"description" => "Devielve el texto",
"access" => "remote",
"arguments" => array("dato")
)
);
}
function enviar($data) {
$midato = "Hola. Te devuelvo tu mensaje amigo --> " .$data;
return $midato;
}
}
?>
y por ultimo el codigo del gateway:
Código :
<?php
include("./app/Gateway.php");
$gateway = new Gateway();
$gateway->setBaseClassPath(realpath("services/") . "/");
$gateway->service();
exit();
?>
haber si ahi suerte por yo ya n q hacer!!!
