Play SWF Movie

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
pdaniel
Forum Newbie
Posts: 1
Joined: Tue May 21, 2002 4:58 am

Play SWF Movie

Post by pdaniel »

I have a SWF movie made in flash (a banner) and I'd like to add it to a php page but I can't get it to play.

Can someone help me out?

Regards,
Pedro Gonçalves
User avatar
enygma
Site Admin
Posts: 175
Joined: Fri Apr 19, 2002 8:29 am
Location: Dallas, Tx

Post by enygma »

Well, besides being the wrong place to ask that - here's what you do:

Go into flash and load the SWF up, then Go under the file menu and export it with the HTML (there should be an option there) and then just use that HTML.

-enygma
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Here ya go

Post by Benjamin »

Here is some html code that should get your flash embedded, you'll have to modify the sizes etc...

Code: Select all

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="32" height="32">
  <param name=movie value="folder/flash/movie.fla">
  <param name=quality value=high>
  <embed src="folder/flash/movie.fla" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="32" height="32">
  </embed> 
</object>
User avatar
sam
Forum Contributor
Posts: 217
Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:

Post by sam »

I've always wondered it the flash classid: contains part of your serial number or other unique tracking information.

Cheers Sam
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

the code with <object>...<embed>..... is a 'double-strike' for Navigator and IE compatible browser. The <object>-element is for IE.
If you take a look in the registry you'll find an entry HKEY_CLASSES_ROOT\CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}. It's the com-classid of the schockwave-plugin.
The Navigator ignores this element but handles the <embed>-element
MattF
Forum Contributor
Posts: 225
Joined: Sun May 19, 2002 9:58 am
Location: Sussex, UK

Post by MattF »

According to W3 ( http://www.w3.org ) the <object> element is the one that is supposed to be used for most things like Flash and Java, the <embed> tag can be used but it is now deprecated (spelling?). If only all the browsers would follow proper rules it would all be ok :(
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

:evil: right. I really hate to check the pages against all those browsers, especially if they contain DHTML. One way is to say 'Sorry, wrong browser'. But which one to choose?
Post Reply