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: 30
Location: Athens, Greece
Trades: 0
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
Do not try this at home!

Posts: 3,600
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
or better yet: swfobject.
http://code.google.com/p/swfobject/

__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 04-03-2008, 05:17 AM Re: How to write valid XHTML while embedding Flash SWF objects
igniz's Avatar
Skilled Talker

Posts: 51
Name: frost
Location: philippines
Trades: 0
hope it helps to you joost blog http://www.joostdevalk.nl/code/valid...embedding.html
__________________
Sikat ang Pinoy -X my site X-
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
Extreme Talker

Posts: 173
Name: octavian
Location: home
Trades: 0
<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
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.10180 seconds with 13 queries