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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.