[SOLVED] Help with PHP for Flash Animations

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
neobolt
Forum Newbie
Posts: 9
Joined: Wed Apr 14, 2004 7:43 pm

[SOLVED] Help with PHP for Flash Animations

Post 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
Last edited by neobolt on Wed Oct 06, 2004 6:00 pm, edited 2 times in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.'">';
neobolt
Forum Newbie
Posts: 9
Joined: Wed Apr 14, 2004 7:43 pm

Post by neobolt »

Hey thanks, Works perfectly.
Post Reply