koolaid Posted February 11, 2008 Share Posted February 11, 2008 ok i am trying to wrap my brain around php. Here is my predicament, I am developing a flash game. I need to pass the # of wrong answers from one stage in the game to another. I load my swf's like this: <? include ("CCOMRheader.template"); ?> <div align="center"> <table bgcolor="#000000" width="657" style="border: 0px solid #45637F"> <!--DWLayoutTable--> <tr> <td width="750" height="1152" valign="top"> <script type="text/javascript" src="/cc-common/flashobject.js"></script> <div id="flashcontent"> This text is replaced by the Flash movie. </div> <script type="text/javascript"> var fo = new FlashObject("collegeRock.swf", "dle", "750", "1152", "8", ""); fo.addParam("wmode", "transparent"); fo.addParam("allowScriptAccess", "sameDomain"); fo.write("flashcontent"); </script> </td> </tr> </table> </div> <? include ("CCOMRfooter.template"); ?> I know how to move the variable from flash to a php file via post, but once i have it in a php file like so ///numwrong being my flash var $numberWrong = $_POST["numwrong"]; How would i pass that var into flash as it loads the new page? I could write it to a text file on the server and retrieve it with flass, but i know that this is not the propper way to do it. Does anybody know of a good tutorial or place for me to start with this? Thanks in advance guys. Link to comment https://forums.phpfreaks.com/topic/90529-newbie-question-flashphp/ Share on other sites More sharing options...
koolaid Posted February 11, 2008 Author Share Posted February 11, 2008 i have been researching and i think i may be able to accomplish this via session data? Any thoughts? Link to comment https://forums.phpfreaks.com/topic/90529-newbie-question-flashphp/#findComment-464251 Share on other sites More sharing options...
revraz Posted February 11, 2008 Share Posted February 11, 2008 For PHP, yes, use sessions to transfer variables from one page to another. Link to comment https://forums.phpfreaks.com/topic/90529-newbie-question-flashphp/#findComment-464256 Share on other sites More sharing options...
koolaid Posted February 11, 2008 Author Share Posted February 11, 2008 Where does it store the data? Does it write to the server or can i pass it directly into my flash piece. All i need to transfer is one #, and i only need it to transfer as long as they are on the site. My boss wants pages views and stats from my flash game, but i can only give him stats for the entire game not each section. Well this means i need to make each section it's own page. I want to pass the number of questions they got wrong between flash pages. Does anyone know where i should start. Link to comment https://forums.phpfreaks.com/topic/90529-newbie-question-flashphp/#findComment-464291 Share on other sites More sharing options...
revraz Posted February 11, 2008 Share Posted February 11, 2008 http://www.htmlgoodies.com/beyond/php/article.php/3472581 Link to comment https://forums.phpfreaks.com/topic/90529-newbie-question-flashphp/#findComment-464299 Share on other sites More sharing options...
phpQuestioner Posted February 11, 2008 Share Posted February 11, 2008 http://www.kirupa.com/developer/actionscript/flash_php_mysql.htm Link to comment https://forums.phpfreaks.com/topic/90529-newbie-question-flashphp/#findComment-464300 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.