Advertisement
Guest User

Untitled

a guest
Nov 27th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. stop();
  2. var envio:LoadVars = new LoadVars();
  3. var recibir:LoadVars = new LoadVars();
  4. function login() {
  5. _global.username_txt = username_txt.text;
  6. envio.username = username_txt.text;
  7.  
  8. envio.password = password_txt.text;
  9. envio.action = "login";
  10. envio.sendAndLoad("consulta.php", recibir, "POST");
  11. }
  12. recibir.onLoad = function(exito) {
  13. if (exito) {
  14. switch (this.opcion) {
  15. case "0" :
  16. mensaje_txt.text = "no existe el usuario";
  17. break;
  18. case "1" :
  19. mensaje_txt.text = "nombre de usuario o pass mal ingresado";
  20. break;
  21. case "2" :
  22. mensaje_txt.text = "datos correctos";
  23. gotoAndPlay(23);
  24.  
  25. break;
  26. default :
  27. mensaje_txt.text = "no hay conexión";
  28. break;
  29. }
  30. } else {
  31. mensaje_txt.text = "Error en el Script";
  32. }
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement