PDA

View Full Version : Validation with flash?



ern
06 Jul 2007, 10:48 AM
is there any way to get an XHTML/CSS site to validate with a flash header? When i run the validator, the only errors i get are from my flash piece. Here's the code i'm using:

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

It doesn't seem to recognize any of the attributes in the <embed> tag. Any suggestions?

Wickham
06 Jul 2007, 01:11 PM
It's common for the embed tag to be called an error by validators, but it's still in common use, even by major sites like YouTube, so I wouldn't worry about it.
The code you are using means IE uses the object tag and Firefox uses the embed tag.

It is possible to delete the embed tag provided the object tag is changed from
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="960" height="200" title="Kentuckiana Dreamcenter">.........
to
<object type="application/x-shockwave-flash" width="960" height="200" class="VideoPlayer" align="middle"
data="your-video.swf">..........
which I think uses a computer's inbuilt flash software while the classid downloads a plugin, in other words my method works on computers that are "flash-ready" which many are now, so you may need to warn viewers to get "flash-ready".

Try this:-
<object type="application/x-shockwave-flash" width="960"
height="200" class="VideoPlayer" align="middle" data="Images/KentuckianaDreamcenterHeader.swf">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="Images/KentuckianaDreamcenterHeader.swf"/>
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="scale" value="exactfit" />
<param name="bgcolor" value="#ababab" />
<param name="wmode" value="transparent" />
<param name="flashvars" value="ze=ro" />
</object>

It works with one of my local computer videos and validates. Some of the parameters can be deleted.

There can also be a problem if the lines between the < and > are not continuous, line breaks sometimes cause a problem so edit maximised and make sure the object tag especially is continuous code with no line break.
----------edit
After spending an hour with your example I found I had already done it in my tutorial!
http://www.wickham43.supanet.com/tutorial/flashvideo.html
The validator picks up the embed tag in item 1 down to line 60 but no errors in item 2 which does not have the embed tag but still works in my Firefox, IE6, IE7 and Safari for Windows.