PDA

View Full Version : XHTML Validation and swf files


fwr1000
04-01-2007, 02:58 PM
I have an .swf file on a page and when running through the W3C validator (not from within DW but the W3C site) I get 8 errors, all involving the .swf file and all on the same code line.

Here is the first error

Line 30 column 17: there is no attribute "src".

<embed src="SWF_Files/aaaaa_sound_12_RC.swf" width="770" height="220" loop

The other error messages all refer to the same code line.

Page renders correctly in IE 6, 7 FF 1.5, 2.0, Opera and Netscape.

I always try to insure all CSS and HTML is valid so is this something that can be fixed or just an anomaly when using .swf files?

Thanks for any claification.

Fred

domedia
04-02-2007, 01:47 AM
Normal implementation of swf files has always been done by using non-standard code.
Some people came up with a pretty nice way of making it valid though. Check out alistapart.com and their artcile flash satay:
http://www.alistapart.com/articles/flashsatay/

fwr1000
04-02-2007, 03:57 PM
Thnx Dom. Checked it out. Probably will leave well enough alone. Site validates 100% except for this issue and also validates for accessability.

Fred

domedia
04-02-2007, 04:15 PM
I think you're safe. 100% validation apart from he flash stuff is an achievement in itself.

chriskq
04-03-2007, 01:50 AM
you should use a swf object embed script when embedding swfs into your site.

this prevents IE from making it an activeX object. and also the fact that you have to click on the swf to bring focus to it before you can interact with it in IE.

Also creates better usability because you can use an alternate div to display something if the end user does not have a flash player installed

http://blog.deconcept.com/swfobject/

fwr1000
04-03-2007, 02:12 AM
I believe it is embeded. Here is the code.


AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','770','heigh t','220','title','Maria\'s Logo','src','SWF_Files/aaaaa_sound_12_RC','loop','false','quality','high' ,'pluginspage','http://www.macromedia.com/go/getflashplayer','movie','SWF_Files/aaaaa_sound_12_RC' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="220" title="Maria's Logo">
<param name="movie" value="SWF_Files/aaaaa_sound_12_RC.swf" />
<param name="quality" value="high" /><param name="LOOP" value="false" />
<embed src="SWF_Files/aaaaa_sound_12_RC.swf" width="770" height="220" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object></noscript></td>