PDA

View Full Version : Validating the HTML output by Flash


lelales
07-16-2007, 09:04 PM
Hello, I get the following validation errors when I validate my code:Error Line 114, column 81: there is no attribute "SRC" .
... NAME=quality VALUE=high> <EMBED src="clouds.swf"
and
Error Line 115, column 0: element "EMBED" undefined .
</EMBED>

is there a way to override this?

thanks

Paul Ferrie
07-16-2007, 09:09 PM
swfObject seems to run well with W3C validater.
Have you tried it?

lelales
07-16-2007, 09:30 PM
I figured a work around using Javascript.

Basically, calling the RunFoo command in the HTML doesn't cause any validation errors. Here's the code:function RunFoo()
{
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" WIDTH="366" HEIGHT="175" id="clouds">\n');
document.write(' <PARAM NAME=movie VALUE="clouds.swf" \>\n');
document.write('<param name="quality" value="high">\n');
document.write('<EMBED src="clouds.swf" quality="high" bgcolor=#9494AD width="366" height="175" NAME="clouds"
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>\n');
document.write('</object>\n');
}


Then call the command in the HTML document:
[AS]<script type="text/javascript">RunFoo();</script>[AS]