Hello,
I want all the flash animations on my site to load onto one display page.

Example:
http://www.smartmindmedia.com/flash/play.php?id=licenseplate&width=430&height=300

If you follow the above link it will take you to the play.php page.

The flash "licenseplate" loads fine, except the width and heights aren't applied. It appears very small.

This is the code I use on the play.php page:

<?
$id = $GET['id'];
$width = $
GET['width'];
$height = $_GET['height'];
echo "<object classid=clsid😃27CDB6E-AE6D-11cf-96B8-444553540000>";
echo "<codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0>";
echo "<id=$id width=$width height=$height>";
echo "<param name=movie value=http://www.smartmindmedia.com/flash/files/$id.swf>";
echo "<param name=bgcolor value=#FFFFFF>";
echo "<param name=quality value=high>";
echo "<param name=allowscriptaccess value=samedomain>";
echo "</object>";
?>

Thanks
John MacDougall

    ..even though I don't know what the code prints on the page and being no flash guru it might be that the code is wrong.

    Isn't it supposed to be a tag like this:
    <OBJECT classid="" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="$whatever1" HEIGHT="$whatever2" id="" ALIGN="">

    and like this:
    <EMBED src="" quality=high bgcolor=#FFFFFF

    WIDTH="$whatever1" HEIGHT="$whatever2" ALIGN=""
    TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">

    i.e. to specify both the height and width twice?

    If this isn't the problem show me what the page outputs and I might find a solution there...

      Love the license plates 😉

      Anyhow, get into the habit of always quoting attributes in your HTML. Make the change as shown below, and see if that helps any:

      <? 
      $id = $_GET['id']; 
      $width = $_GET['width']; 
      $height = $_GET['height']; 
      echo "<object classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\">"; 
      echo "<codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0\">"; 
      echo "<id=\"".$id."\" width=\"".$width."\" height=\"".$height."\">"; 
      echo "<param name=\"movie\" value=\"http://www.smartmindmedia.com/flash/files/$id.swf\">"; 
      echo "<param name=\"bgcolor\" value=\"#FFFFFF\">"; 
      echo "<param name=\"quality\" value=\"high\">"; 
      echo "<param name=\"allowscriptaccess\" value=\"samedomain\">"; 
      echo "</object>"; 
      ?> 
      

      Note, although it isn't required when double-quoting, I did take the liberty in concatenating the variables...

        Thanks guys, I ended up figuring it out. I had to move a couple of line around thats all.

        echo "<object classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\">";  
        echo "<codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0\">";
        echo "<id=\"".$id."\" width=\"".$width."\" height=\"".$height."\">";

        These three lines had to be combined into one.

          Write a Reply...