Page 1 of 1

embedding flash into php

Posted: Sun Jun 20, 2004 7:54 am
by javman
When I place a flash object into php it simply will not run. Even if I remove the cookie condition it will not run. I have tried it in an html document and simply with this code below. Nothing. There is not a lot of info about this. Not a thing in my text books. I will continue to look on the Macromedia site but nothing yet.

Code: Select all

<?php 
//Check if cookie is set 
if (!isset($_COOKIE['name'])){  
'<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
 WIDTH="224" HEIGHT="64" id="website" ALIGN="">
 <PARAM NAME=movie VALUE="website.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="website.swf" quality=high bgcolor=#FFFFFF  WIDTH="224" HEIGHT="64" NAME="website" ALIGN=""
 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>';
}
?>
feyd|use

Code: Select all

tags when posting code[/color]

Posted: Sun Jun 20, 2004 12:02 pm
by feyd
uh.. how about this:

Code: Select all

<?php

echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="224" height="64" id="website"><param name="movie" value="website.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><embed src="website.swf" quality="high" bgcolor="#FFFFFF"  width="224" height="64" name="website" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>';

?>

Posted: Sun Jun 20, 2004 1:09 pm
by John Cartwright
lol..

Posted: Mon Jun 21, 2004 4:31 pm
by javman
This is the answer. I must say that I would never have succeeded at this without your help.
I see what you have changed. But I have no idea why. I will have to read some more and study this.
However this example works and will serve me well for other flash movies that I want to embed in PHP
Thank you again very much. This is such a big help.

Posted: Mon Jun 21, 2004 4:34 pm
by feyd
uhm.. it was 99% the "echo" bit..

without that, you would never print anything.