I am getting trouble in getting values of variables from php in flash.
e.g. $variable1 = “myname” (in php)
how to display the text in a textbox in flash?
please help me.
thanks in advance.
when you echo in PHP that data goes back to flash as a String. Exactly how send to PHP and get a return response depends on AS version, but that can be googled
I am using AS2 , flash 8
Pass it into the SWFObject:
var so = new SWFObject("myfile.swf", "mymovie", "500", "400", "8", "#000000"); so.addParam("menu", "false"); so.addVariable("myVariable", "<?php echo $myVar ?>"); so.write("flash");
In Flash, you can find it by calling:
I guess I didn’t ask, is PHP writing the HTML page for flash play in (that’s abenson’s solution) or is it Flash communicating with PHP at runtime (what I was explaining)?
In flash 8 to communicate with php you use LoadVars and sendAndLoad, but my AS2 sucks from decayed lack of use so google those two things with PHP and you’ll be farther than if I help you
Here, I’ve quickly written a script on pastie. I haven’t debugged but I’m sure you can figure out anything wrong.
If you need any more help I’m always on the forum, or email me through my profile.
Note: For the actionscript I’ve written it in both AS2 and AS3 so make sure you use the right one and not to paste both versions on by accident
thank’s for this help…