Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stop();
- var envio:LoadVars = new LoadVars();
- var recibir:LoadVars = new LoadVars();
- function login() {
- envio.username = username_txt.text;
- envio.password = password_txt.text;
- envio.action = "login";
- envio.sendAndLoad("consulta.php",recibir,"POST");
- }
- recibir.onLoad = function(exito) {
- if (exito) {
- switch (this.opcion) {
- case "0" :
- mensaje_txt.text = "el usuario no existe";
- break;
- case "1" :
- mensaje_txt.text = "nombre de usuario o contraseña incorrectos";
- break;
- case "2" :
- mensaje_txt.text = "datos correctos";
- //acá pueden agregar acciones para los registrados
- break;
- default :
- mensaje_txt.text = "no hay conexión";
- break;
- }
- } else {
- mensaje_txt.text = "Error en el Script";
- }
- };
Add Comment
Please, Sign In to add comment