El codigo de python es:
------archivo gateway.py--------------
Código :
#!c:/python/python
print 'Content-type: text/html'
print
from AMF import AMF
import sys
gateway = AMF.AMF()
gateway.setRelativeBaseClassPath("./services")
gateway.service()-------------------------------
-------arhivo hola.py------
Código :
#!c:/python/python
import sys
class hola:
def methodTable(self):
table = {}
table["enviar"]= {
"description" : "retorna algo",
"access" : "remote",
"returns" : "string"
}
return table
def enviar(arg):
data="Me has enviado: "+arg
return data---------------------------------
------codigo flash------------
Código :
import mx.remoting.NetServices;
import mx.remoting.Connection;
mx.remoting.debug.NetDebug.initialize();
capturaRespuesta = new Object();
capturaRespuesta.enviar_Result = function(data){
texto_txt.text=("Dato recibido del servidor: "+data);
};
capturaRespuesta.onStatus = function(data){
texto_txt.text=("Ocurrio un error.");
texto_txt.text=("Detalles del error: "+data.description);
};
NetServices.setDefaultGatewayUrl("http://192.168.1.36/pruebas_flash/python/ ejemplos_python/holaMundo/gateway.py");
conn = NetServices.createGatewayConnection();
serv = conn.getService("holaquetal", capturaRespuesta);
serv.enviar("Probando");
---------------------------------
el archivo flash tiene un texto dinamico con la instancia texto_txt
por cierto utilizo flash mx professional 2004 con flash remoting as 2.0

