PDA

View Full Version : Loading External Vars From PHP File...



REEFˇ
January 18th, 2004, 12:03 PM
How do I load a variable from a PHP file? And also display that variable on the stage...

kill.robot.kill
January 18th, 2004, 01:00 PM
if you have worked with loading text from a text file, this works the same way. You need to use the LoadVars() object to get the variable into your flash movie. From php you have to have it print to the screen what you want flash to read. An example of this would be
&myName=steve

Really the flash part is pretty easy, the hard part is getting the php to work properly. With just straight php to flash, your data has to be printed to a php page. Flash tells the php page to run its code, and reads the output to the screen. It can't read variables hidden inside the code.

kode
January 18th, 2004, 01:53 PM
http://www.kirupa.com/developer/actionscript/asandphp.htm