Jump to content


Photo

How to add swf's (flash) to php pages?


  • Please log in to reply
3 replies to this topic

#1 alexville

alexville
  • Members
  • PipPipPip
  • Advanced Member
  • 71 posts

Posted 02 April 2006 - 02:16 PM

How do I do that?

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]How to add swf's (flash) to php pages?[/quote]

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 02 April 2006 - 02:28 PM

No different to adding them to html pages. Something like...
<object width="550" height="400">
  <param name="movie" value="somefilename.swf">
  <embed src="somefilename.swf" width="550" height="400"></embed>
</object>


#3 alexville

alexville
  • Members
  • PipPipPip
  • Advanced Member
  • 71 posts

Posted 02 April 2006 - 06:45 PM

Thank you for the reply. With this code
if ($scorelevel > 13000) {
    echo "<p>You are on/passed Level 32</p><p><strong>You have finished the game. Of course you can still play. I make new levels all the time!</strong></p>";
    <object width="550" height="400">;
   <param name="movie" value="somefilename.swf">;
   <embed src="/images/fireworks.swf" width="350" height="200"></embed>;
   </object>;
}
, I get a [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Parse error: parse error, unexpected '<' in /home/alexg/public_html/whoami/hello.php on line 152[/quote] error message.

#4 Mr.x

Mr.x
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 02 April 2006 - 11:10 PM

Theres 2 ways to get around this. Either put it in an Echo or take it out of the php.

if ($scorelevel > 13000) {
    echo "<p>You are on/passed Level 32</p><p><strong>You have finished the game. Of course you can still play. I make new levels all the time!</strong></p>";
     echo "<object width='550' height='400'>
   <param name='movie' value='somefilename.swf'>
   <embed src='/images/fireworks.swf' width='350' height='200'></embed>
   </object>";
}

OR

if ($scorelevel > 13000) {
    echo "<p>You are on/passed Level 32</p><p><strong>You have finished the game. Of course you can still play. I make new levels all the time!</strong></p>";
?>    

<object width='550' height='400'>
   <param name='movie" value="somefilename.swf'>
   <embed src='/images/fireworks.swf' width='350' height='200'></embed>
   </object>

<? }





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users