Jump to content

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


alexville

Recommended Posts

No different to adding them to html pages. Something like...
[code]
<object width="550" height="400">
  <param name="movie" value="somefilename.swf">
  <embed src="somefilename.swf" width="550" height="400"></embed>
</object>
[/code]
Link to comment
Share on other sites

Thank you for the reply. With this code [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>;
}[/code], 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.
Link to comment
Share on other sites

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

[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>";
     echo "<object width='550' height='400'>
   <param name='movie' value='somefilename.swf'>
   <embed src='/images/fireworks.swf' width='350' height='200'></embed>
   </object>";
}[/code]

OR

[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>

<? } [/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.