asd

by Prid on February 24th, 2012
No notes
Syntax: ActionScript
Show lines - Hide lines - Show in textbox - Download
  1. function register(){
  2. sendVars = new LoadVars();
  3. sendVars.user = username_txt.text;
  4. sendVars.pass = password_txt.text;
  5. sendVars.sendAndLoad("conversation.php", responseVars, "POST");
  6.  
  7. responseVars = new LoadVars();
  8. responseVars.onLoad = function(success){
  9. if(success){
  10. if(this.response == "true"){
  11. // REGISTRATION SUCCESSFUL
  12. } else if(this.reponse == "false"){
  13. // USERNAME ALREADY TAKEN
  14. }
  15. } else {
  16. // FAILED TO CONNECT TO SERVER
  17. }
  18. }
  19. }
  20.  
  21. submit_btn.onPress = function(){
  22. register();
  23. }

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS