Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
How to write valid XHTML while embedding Flash SWF objects
Old 03-30-2008, 04: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

Please login or register to view this content. Registration is FREE


Last edited by John Efstathiou; 03-31-2008 at 01:28 PM..
John Efstathiou is offline
Reply With Quote
View Public Profile Visit John Efstathiou's homepage!
 
 
Register now for full access!
Old 03-30-2008, 05:00 PM Re: How to write valid XHTML while embedding Flash SWF objects
tripy's Avatar
Do not try this at home!

Posts: 3,621
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, 06: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
__________________

Please login or register to view this content. Registration is FREE
-X my site X-
igniz is offline
Reply With Quote
View Public Profile Visit igniz's homepage!
 
Old 04-03-2008, 01:04 PM Re: How to write valid XHTML while embedding Flash SWF objects
vectorialpx's Avatar
Extreme Talker

Posts: 241
Name: octavian
Location: Bucharest
Trades: 0
<object type='application/x-shockwave-flash' data='flash/1.swf' width='300' height='240'>
<param name='movie' value='flash/1.swf' /></object>
__________________
you can
Please login or register to view this content. Registration is FREE
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.36643 seconds with 12 queries