Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/04/2011, 13:10
Avatar de alexander_sp
alexander_sp
 
Fecha de Ingreso: febrero-2004
Ubicación: Barcelona
Mensajes: 719
Antigüedad: 20 años, 2 meses
Puntos: 4
Respuesta: COdigo de Formulario PHP AS3 FLASH. pero por favor mirar el codigo un mome

Gracias Potro.......te lo adjunto ( pero me parece que me van a cambiar el post al foro de flash ) .......Thanks

var misVariables:URLVariables = new URLVariables();
var cargador:URLLoader = new URLLoader();
var pedido:URLRequest = new URLRequest();


pedido.url = "http://designiastudio.com/enviarMail.php";
pedido.method = URLRequestMethod.POST;
pedido.data = misVariables;
cargador.dataFormat = URLLoaderDataFormat.VARIABLES;

enviar_btn.addEventListener(MouseEvent.CLICK, enviar);
cargador.addEventListener(Event.COMPLETE, cargaCompleta);

function enviar(event:MouseEvent)
{
if(mail_txt.text.indexOf("@") == -1 || mail_txt.text.indexOf(".") == -1)
{
status_txt.text = "Introduce un mail correcto";
}
else
{
enviarFormulario();
}
}

function enviarFormulario()
{
misVariables.nombre = nombre_txt.text;
misVariables.telefono = telefono_txt.text;
misVariables.mail = mail_txt.text;
misVariables.mensaje = mensaje_txt.text;

try
{
cargador.load(pedido);
}
catch (error:Error)
{
trace ("Error en el envío"+error);
}
}

function cargaCompleta(event:Event):void
{
nombre_txt.text = "";
telefono_txt.text = "";
mail_txt.text = "";
mensaje_txt.text = "";

gotoAndStop(10);
}

stop();
__________________
http://www.greatividad.es/