embedding flash into php

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
javman
Forum Newbie
Posts: 5
Joined: Sat Jun 19, 2004 2:19 am

embedding flash into php

Post 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]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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>';

?>
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

lol..
javman
Forum Newbie
Posts: 5
Joined: Sat Jun 19, 2004 2:19 am

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uhm.. it was 99% the "echo" bit..

without that, you would never print anything.
Post Reply