|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP into Flash
I am somewhat of a newb at PHP. I have dome a lot of forms and stuff like that but I am having some difficulty getting data INTO flash. Here is my problem
//I call the URL URL'+quizid //and I get something like this in return. Code:
<numRows>3</numRows>
<questions id='questions'>
<question id ='1'>
<TYPE><![CDATA[type]]></TYPE>
<BODY1><![CDATA[b1]]></BODY1>
</question>
</questions>
How, how do I call that data into into flash and parse it out to the right variables? Thanks for the help. Would you recomond any good PHP/Flash books? |
|
#2
|
||||
|
||||
|
You might want to check out this article:
http://www.macromedia.com/devnet/mx...les/amfphp.html Also, it is possible to get variables into flash using loadVars("phpscript.php" . . .), but its extremely tedioius, and the php has to format the varables so that they appear as so: &var1=whatever& &var2=somethingelse& Don't quote me on that syntax though. As far as books, i know the flash mx developer's guide has a few solid chapters on php. P.S. If you want to get XML directly into php, one way to go is to buy the flash firefly components Last edited by blatant : July 18th, 2003 at 02:03 PM. |
|
#3
|
|||
|
|||
|
This is the simplist way I have found for getting data from php into flash. Note that loadVars requires mx, but you can do similar with loadvariables etc
my php file will produce something like this: echo "&var1=Joe&var2=Smith&var3=Some+Place"; The flash actionscript looks like this.. myData = new LoadVars(); myData.load("http://localhost/test/dbase_flash.php", myData); myData.onLoad = function() { firstName = myData.var1; lastName = myData.var2; // etc. trace (firstName + " " + lastName); } I have also done some xml stuff too. Let me know if you want some help with that. Jon |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > PHP into Flash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|