PHPBuilder - Embed Flash

RSS Twitter

Embed Flash

by: NyQuist
October 16, 2001

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.

function flashembed($file, $width, $height) { 
$swfdir = "images/swf";
echo "<tr><td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
 codebase=\",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=\"\" menu=\"false\"></EMBED>

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);


Comment and Contribute

Your comment has been submitted and is pending approval.




(Maximum characters: 1200). You have characters left.