• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Flash in PHP?:S?

0

03bigMark03

Guest
#1
Hi guys, I need some help with PHP.

I have asked at several sites and have asked coding friends but I have so far not received any help. I was wondering how I could insert a flash logo into the PHP language. That would be great if you know how to do this.

PS, the content management system that is used on my site is called Post Nuke (similar to PHPNUKE). The site is also based at http://www.mark-buxton.co.uk (of course!).
 
P

Paul_Don

Guest
#4
<?php echo "<html><body>

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID=Untitled WIDTH=200 HEIGHT=200>
<PARAM NAME=movie VALUE="flash.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=false>
<EMBED src="flash.swf" loop=false quality=high
WIDTH=200 HEIGHT=200 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>

</body></html>"; ?>


that should sort ya
 
#5
Pretty useless to use PHP in this case IMO since there's nothing dynamic. This is enough:
Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
ID=Untitled WIDTH=200 HEIGHT=200>
<PARAM NAME=movie VALUE="flash.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=loop VALUE=false>
<EMBED src="flash.swf" loop=false quality=high
WIDTH=200 HEIGHT=200 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
 
0

03bigMark03

Guest
#6
It don't work, Help.

The image bit is header.gif

/*****************************************************************************************/
/* Theme Header Start */
/*****************************************************************************************/

function themeheader() {
global $thename, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $index;
$sitename = pnConfigGetVar('sitename');

echo"<body bgcolor=\"818181\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n"
."<div align=\"center\"><br>\n"
."<table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
."<tr>\n"
."<td><img src=\"themes/Pixame_Style/images/header.gif\" width=\"775\" height=\"34\"></td>\n"
."</tr>\n"
."</table>\n"
 
0

03bigMark03

Guest
#7
*

Sorry about the lack of information there. Now you see the code above? That's part of the theme.php file and the
."<td><img src=\"themes/Pixame_Style/images/header.gif\" width=\"775\" height=\"34\"></td>\n"
is were the image is displayed. I have tried to insert flash code in here but I got some error messages (parse errors, can't remember them). So if you guys can determin the correct code for this theme.php file for flash that would be great help.
 
#8
When you paste in the flash code you must escape all the quotes. This means that you must replace all the " in the flash code with \" first. Just like it's done in the original code.
 
0

03bigMark03

Guest
#9
Help

Cool. Sound's as though it's the right idea. I'm quit new to PHP (hence postnuke) but if you could provide and example of replacing thoughs thingies in my code that would be great.
 
#10
Aaww ffs. Oh, alright. Here ya go.

Code:
echo"<body bgcolor=\"818181\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n"
."<div align=\"center\"><br>\n"
."<table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
."<tr>\n"
."<td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\"
ID=Untitled WIDTH=200 HEIGHT=200>\n"
."<PARAM NAME=movie VALUE=\"flash.swf\">\n"
."<PARAM NAME=quality VALUE=high>\n"
."<PARAM NAME=loop VALUE=false>\n"
."<EMBED src=\"flash.swf\" loop=false quality=high
WIDTH=200 HEIGHT=200 TYPE=\"application/x-shockwave-flash\"
PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash\">\n"
."</EMBED>\n"
."</OBJECT>\n"
."</td>\n"
."</tr>\n"
."</table>\n"
No guarantees on functionality.
Make sure that :D is turned into : and D first!
 
0

03bigMark03

Guest
#11
Almost Done

Ok here is the code I have so far...

."<tr>\n"
."<td><OBJECT classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\"
codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\">\n"
."<PARAM NAME=movie VALUE=\"http://www.potton-delph.com/mark/internetstuff/themes/Pixame_Style/images/netstuff.swf\">\n"
."<PARAM NAME=quality VALUE=high>\n"
."<PARAM NAME=loop VALUE=false>\n"
."<EMBED src=\"flash.swf\" loop=false quality=high
WIDTH=200 HEIGHT=200 TYPE=\"application/x-shockwave-flash\"
PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash
\">\n"
."</EMBED>\n"
."</OBJECT>\n"
."</td>\n"
."</tr>\n"
."</table>\n"
."<table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
."<tr> \n"


It almost works but the logo does not display. What am I doing wrong?
 
0

03bigMark03

Guest
#12
Ok. I have sorted out all the code and it should work theoretically, but it doesn’t. Why not?

."<EMBED src=\"flash.swf\" loop=false quality=high
Sorted that out, now matches flash file name. But still it does not display
 

Members online

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,013
Latest member
Pdawgintown