User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,666 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,868 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 550 | Replies: 3 | Solved
Reply
Join Date: Jul 2007
Posts: 102
Reputation: Designer_101 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Designer_101 Designer_101 is offline Offline
Junior Poster

Loading PHP into flash?

  #1  
Mar 11th, 2008
hi
Im sure this is an easy problem to resolve. Basicly for my log-in script, im retreiving the results from a database, storing them in variables but i would like the redirection to be in flash (better looking).

Is there a way for me to load two variables called
$username
$password
into a flash file using actionscript.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Arkansas
Posts: 347
Reputation: buddylee17 will become famous soon enough buddylee17 will become famous soon enough 
Rep Power: 2
Solved Threads: 68
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Whiz

Re: Loading PHP into flash?

  #2  
Mar 11th, 2008
Use loadVars. Here is some code from a login for a similar project.
I did it with ActionScript 2.0. What you need are three text boxes and a submit button.
The first two text boxes (email and password) will be input text type with instance names of email and password. The third text box should be dynamic text type with an instance name of status. Then in the actions panel of the submit button, put this:
actionscript Syntax (Toggle Plain Text)
  1. on (release) {
  2. status.text = "";//clearing status field for this attempt
  3. serverFile="/login.php";
  4. //creating two LoadVars objects, to send and receive variables
  5. my_lv = new LoadVars();
  6. result_lv = new LoadVars();
  7. //Assign appropriate text boxes to LoadVars object
  8. my_lv.email = email.text;
  9. my_lv.password = password.text;
  10. //Send the variables and Load the servers response
  11. my_lv.sendAndLoad(serverFile, result_lv, "POST");
  12. //event which is called when result_lv passed above, receives response from php page
  13. result_lv.onLoad = function(success:Boolean) {
  14. if (success) {
  15. email.text = "";//clearing all fields
  16. password.text = "";
  17. status.text =result_lv ["serverResponse"]; //entering response to status field for display
  18. }
  19. }
  20. }
Then in the php page, if the person gets logged in,
  1. echo "&serverResponse=Authentication confirmed";
and if denied
  1. echo "&serverResponse=Access denied";
I hope this helps.
Last edited by buddylee17 : Mar 11th, 2008 at 7:11 pm.
Reply With Quote  
Join Date: Jul 2007
Posts: 102
Reputation: Designer_101 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Designer_101 Designer_101 is offline Offline
Junior Poster

Re: Loading PHP into flash?

  #3  
Mar 12th, 2008
thats great thanks
Reply With Quote  
Join Date: Mar 2008
Posts: 10
Reputation: desicoder is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
desicoder desicoder is offline Offline
Newbie Poster

Re: Loading PHP into flash?

  #4  
Mar 13th, 2008
Hi

I have my own team i website development and desktop application's development we are developing since last three days and we are intersted in such type of parites / providers who can provide us some work(s)

We can disscuss more first of all let me know if you are intrested. You can tex me at sirsmac@gmail.com

Regards.
----------
SMAC!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 1:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC