Version: 1.0
Type: Function
Category: Graphics
License: GNU General Public License
Description: Embed Flash swf's in php using a function call from another php file
Add this function to an include-able php file.
=================CUT====================
function flashembed($file, $width, $height) {
$swfdir = "images/swf";
echo "<tr><td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=$width HEIGHT=$height>
<PARAM NAME=movie VALUE=\"$swfdir/$file.swf\">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=menu VALUE=false>
<EMBED src=\"$swfdir/$file.swf\" quality=high WIDTH=$width HEIGHT=$height TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED>
</OBJECT></tr></td><br>";
}
=================CUT====================
Include the function file; and call the function, specifying the swf file, the width and height e.g.
include ('functions.php');
flashembed(test, 700, 400);