A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Checking Login Info

Hybrid View

  1. #1
    Junior Member
    Join Date
    Dec 2002
    Posts
    28

    Checking Login Info

    Hey there flash gurus, can someone give me a hand with this?

    For some odd reason flash won't run the loadvars, it gets hung up in the if statement. This is my code that I have:

    Code:
    on (release) {
    	if (lastName != "") {
    		txt = new LoadVars();
    		txt.firstName = firstName;
    		txt.lastName = lastName;
    		txt.onLoad = handleLoad;
    		txt.sendAndLoad("http://localhost/flashASP/registrationSearch.asp", txt, "GET");
    		_root.error._visible = false;
    		function handleLoad(success) {
    			if (success) {
    				trace("loaded");
    				trace("txt="+txt);
    				trace("numberOfItems="+txt.numberofItems);
    				//myNewVar=txt;
    				//trace(myNewVar);
    				gotoAndPlay(2);
    			} else {
    				trace("load failed");
    				gotoAndStop("userNotFound");
    			}
    		}
    //	} else {
    //		_root.error._visible = true;
    	}
    }

  2. #2
    FK's Giant Steve_w_V's Avatar
    Join Date
    Mar 2003
    Location
    San Jose, California
    Posts
    2,113
    Maybe put the txt=new LoadVars() outside the if statement...?
    code:

    on (release) {
    txt = new LoadVars();
    if (lastName != "") {
    txt.firstName = firstName;
    txt.lastName = lastName;
    txt.onLoad = handleLoad;
    txt.sendAndLoad("http://localhost/flashASP/registrationSearch.asp", txt, "GET");
    _root.error._visible = false;
    function handleLoad(success) {
    if (success) {
    trace("loaded");
    trace("txt="+txt);
    trace("numberOfItems="+txt.numberofItems);
    //myNewVar=txt;
    //trace(myNewVar);
    gotoAndPlay(2);
    } else {
    trace("load failed");
    gotoAndStop("userNotFound");
    }
    }
    // } else {
    // _root.error._visible = true;
    }
    }

    The other day, I bought a box of animal crackers. On the side, it said "Do Not Eat if Seal is Broken". I opened the box and sure enough...

  3. #3
    Junior Member
    Join Date
    Dec 2002
    Posts
    28
    Hmm.. tried, but no luck.

    Put in a couple trace functions and it appears its not sending out the data. It only does it when i take out the if statement.

    This is driving me nuts!

  4. #4
    Junior Member
    Join Date
    Dec 2002
    Posts
    28
    Ending up having the check done at the asp-db level. Wish I could've fixed it at the flash level, but oh well. Its done and its finished and I'm not complaining!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center