Jump to content

[SOLVED] Dynamic Flash Content


harmanUK

Recommended Posts

Hello, im trying to do this with PHP, if their is another way please let me know.

 

Basicly, i want the script to load a flash file based on what id is entered, for example.

 

user enters

 

http://yourdomain.com/index.php?id=456

 

I want it to load the flash file named 456.swf

 

Can anyone help me?

 

This is what i have, im a total n00b to PHP.

 

<?php
$id = $_GET['id'];
$width = "100";
$width = "100";

function flashembed($id, $width, $height) {  
$swfdir = "http://yourdomain.co.uk/scripts/upload";
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/$id.swf\">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=menu VALUE=false>
<EMBED src=\"$swfdir/$id.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>";
}


echo $id;
?>

Note: I have changed to yourdomain.co.uk for privacy reasons.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/115777-solved-dynamic-flash-content/
Share on other sites

try...

<?php
$id = $_GET['id'];
$width = "100";
$height = "100";

function flashembed($id, $width, $height) {  
$swfdir = "http://yourdomain.co.uk/scripts/upload";
echo <<<_FLASH
<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}/{$id}.swf\">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=menu VALUE=false>
<EMBED src=\"{$swfdir}/{$id}.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>

_FLASH;

}

flashedembed($id,$width,$height);

?>

 

Regards ACE

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.