Reply
How to write valid XHTML while embedding Flash SWF objects
Old 03-30-2008, 03:20 PM How to write valid XHTML while embedding Flash SWF objects
John Efstathiou's Avatar
Experienced Talker

Posts: 31
Location: Athens, Greece
One important issue that fellow web designers have is embedding flash (SWF) objects with valid XHTML code. Unfortunately the Dreamweaver code for implementing flash is not valid by W3C. This post will explain how to make it happen



<---------- Dreamweaver generated code for SWF -------------->

<object classid="clsid=27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="100" height="100">
<param name="movie" value="name_of_flash.swf" />
<param name="quality" value="high" />
<embed src="name_of_flash.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="100"></embed>
</object>



<--------------- Valid code for XHTML (transitional) ------------------>

<object type="application/x-shockwave-flash" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
data="name_of_flash.swf"
width="100" height="100">
<param name="movie" value="name_of_flash.swf" />
<param name="quality" value="high"/>
</object>



Instructions
  1. Remove the embed -tag, it isn't needed and it doesn't validate.
  2. The classid tells Internet Explorer which player to use, fortunately, Flash Player responds to type="application/x-shockwave-flash" as well, so we can remove this ugly line.
  3. The codebase attribute is optional.
  4. The only one left: the data-element, it tells Mozilla and Opera where the music is located since they won't get it out of the param-element.
There you have it nice and tidy


Original information found from Joost de Valk's blog
__________________
John Efstathiou - web designer
http://www.johnefstathiou.com

Last edited by John Efstathiou : 03-31-2008 at 12:28 PM.
John Efstathiou is offline
Reply With Quote
View Public Profile Visit John Efstathiou's homepage!
 
When You Register, These Ads Go Away!
Old 03-30-2008, 04:00 PM Re: How to write valid XHTML while embedding Flash SWF objects
tripy's Avatar
Fetchez la vache!

Posts: 2,055
Name: Thierry
Location: In the void
or better yet: swfobject.
http://code.google.com/p/swfobject/

__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 05:17 AM Re: How to write valid XHTML while embedding Flash SWF objects
igniz's Avatar
Experienced Talker

Posts: 45
Name: frost
Location: philippines
hope it helps to you joost blog http://www.joostdevalk.nl/code/valid...embedding.html
__________________
Looking for the hottest auto auction in town?
a collection of my writing is on my web blog
Looking for a serious athlete community try basketball recruiting for free.
igniz is offline
Reply With Quote
View Public Profile Visit igniz's homepage!
 
Old 04-03-2008, 12:04 PM Re: How to write valid XHTML while embedding Flash SWF objects
vectorialpx's Avatar
Super Talker

Posts: 128
Name: irimia octavian
Location: Romania
<object type='application/x-shockwave-flash' data='flash/1.swf' width='300' height='240'>
<param name='movie' value='flash/1.swf' /></object>
__________________
my photos, my website, creation lab
vectorial pixel web services :: and, sorry for my English !
vectorialpx is offline
Reply With Quote
View Public Profile Visit vectorialpx's homepage!
 
Reply     « Reply to How to write valid XHTML while embedding Flash SWF objects
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13759 seconds with 12 queries