Jump to content

newbie question flash/php


koolaid

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.