Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-17-2009, 11:08 PM   PM User | #1
batmans_friend
New to the CF scene

 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
batmans_friend is an unknown quantity at this point
Flash with PHP Login

I'm making a flash login and I have the form all working, it passes on to PHP fine which processes it fine, I've checked that, but I can't get flash to take the output back.. I wonder if anyone could help? Here's the code (I based most of it on a tutorial):
Code:
stop();
//=================================
// INIT
//=================================
path = "php/"; //declare path to php files
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
 if(success){
 //PHP variable value to textbox
 output.text = lvIn.returnVal;
 }else{
 //...or notify of failure
 output.text = "fail";
 }
}
//=================================
// BTN
//=================================
myBtn.onRelease = function(){
 lvOut.username = username.text;
 lvOut.pword = pword.text;
 //send to a blank window...
 //lvOut.send(path + "loginaction.php","_blank");
 //get results returned to lvIn
 lvOut.sendAndLoad(path + "loginaction.php", lvIn, "POST");
};
Thanks a lot
batmans_friend is offline   Reply With Quote
Old 03-18-2009, 09:59 AM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
Did you follow the tutorial exactly and it still didn't work?

Have you traced the values back in?
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Old 03-18-2009, 06:47 PM   PM User | #3
batmans_friend
New to the CF scene

 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
batmans_friend is an unknown quantity at this point
Yes, but then I changed the variable names and added 2 extras and it just doesn't receive.
Traced the values back in?
batmans_friend is offline   Reply With Quote
Old 03-18-2009, 09:52 PM   PM User | #4
batmans_friend
New to the CF scene

 
Join Date: Mar 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
batmans_friend is an unknown quantity at this point
I've worked it out. Thanks a lot for your help.
The code for the box needed to be changed from "returnVal" to whatever the variable was.
Thanks again
batmans_friend is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:53 AM.


Advertisement
Log in to turn off these ads.