Page 1 of 1

[SOLVED] Help with PHP for Flash Animations

Posted: Wed Oct 06, 2004 5:45 pm
by neobolt
Hello,
I want all the flash animations on my site to load onto one display page.

Example:
http://www.smartmindmedia.com/flash/pla ... 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:

Code: Select all

<?
$id = $_GET['id'];
$width = $_GET['width'];
$height = $_GET['height'];
  echo "<object classid=clsid:D27CDB6E-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

Posted: Wed Oct 06, 2004 5:51 pm
by feyd
Please use

Code: Select all

tags when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/size]

remove the > and the end of line 5 & 6. remove the < at the beginning of line 6 & 7. You'll need to replace them with spaces. I believe.

Should seriously think about quoting your attribute values:

Code: Select all

echo ' id="'.$id.'" width="'.$width.'" height="'.$height.'">';

Posted: Wed Oct 06, 2004 6:01 pm
by neobolt
Hey thanks, Works perfectly.