A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Passing Flash Vars and PHP

  1. #1
    Senior Member
    Join Date
    May 2005
    Location
    Wisconsin
    Posts
    181

    Passing Flash Vars and PHP

    I want to read in the objID into flash. Where am i going wrong with the code below.

    Link i want to read the data from and pass to flash.
    http://www.freesurveybuilder.com/qui...95120311102009

    Code:
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    
    <table width="90%" border="1">
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td width="86%"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
      codebase="http://macromedia.com/cabs/swflash.cab#version=6,0,0,0"
      ID=flaMovie WIDTH=700 HEIGHT=300>
      <PARAM NAME=movie VALUE="quiz.swf?<?php echo(urlencode($objID));?>">
      <PARAM NAME=quality VALUE=medium>
      <PARAM NAME=bgcolor VALUE=#99CC33>
      <EMBED src="quiz.swf?objID=<?php echo(urlencode($objID));?>"
        bgcolor=#99CC33 WIDTH=700 HEIGHT=300 
        TYPE="application/x-shockwave-flash">
      </EMBED>
    </OBJECT>
    </td>
        <td width="14%">adds here</td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
    </table>
    Flash object code
    Code:
    XmlId = objID;
    Josh
    Multimedia Programmer
    flashmajic.com

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    where you are sending -
    PHP Code:
    http://www.domain.com/file.php?myVar=1 
    try using -
    PHP Code:
    <object ...>
    <param name="movie" 
    value="file.swf?myVar=<? echo $_GET['myVar']; ?>" >
    <embed src="file.swf?myVar=<? echo $_GET['myVar']; ?>" ...></embed>
    </object>
    the variable myVar is now available on the root timeline of your movie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center