How To: Communicate between Flash AS3 and PHP

Communicate between Flash AS3 and PHP

All the files you need are in a free download on DevelopPHP. PHP has to be on a server. It will not run on a local machine. Type your name. There are two variables which show up in the dialog boxes (which are stacked.) You can change the user name. It sets up a URL request and a URL loader and sends some URL variables and are placed into the value of names and pairs. They get posted to the PHP file. Place the URL reference location of where the PHP files are on your server in the line that says, "now URL request." The two variables that you get back from PHP are on lines 27-31. Put the local variables in Flash on lines 27-28. Then, send them out in the two text fields. The script will only run if the request is sent from flash. When everything is ok, put the user name into a local variable in PHP and print variable one, its variable and an ampersand. Add variable two to the string going to Flash. Send them back to Flash. This can be used to create a login, contact or registration form.

Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.

Buy Now (97% off) >

Other worthwhile deals to check out:

Join the Next Reality AR Community

Get the latest in AR — delivered straight to your inbox.

Be the First to Comment

Share Your Thoughts

  • Hot
  • Latest