i have found a way to validate an html 4.0 page containing flash content
perhaps not the best....but it does seem to work and does not really require all that is below, but simply to use javascript to write the object/embed tags using document.write.
however....i will explaing the implementation of this method on
http://www.canusa.net
so... detect for flash player using an old method provided by macromedia that utilizes an external javascript file and vbs file.
http://www.canusa.net/dispatcher.js
http://www.canusa.net/dispatcher.vbs
in the HTML page with flash, call on function
MM_flashInfo();
This function returns an array containing the following:
flashInfo = new Array();
flashInfo[0] = this.installed; // is flash installed
flashInfo[1] = this.implementation; // java or activeX
flashInfo[2] = this.autoInstallable; // is it autoinstallable for this browser
flashInfo[3] = this.version; what player version number
flashInfo[4] = this.revision; what player revision number
Then in my page I run the following javascript
if ((flashInfo[0]) && (parseInt(flashInfo[3]) >= 6)){
document.write(flashMenu);
} else {
document.write(htmlMenu);
}
This determines if the flash player is installed, and if its' version is greater than or equal to 6 (change the 6 to whatever version you are targeting and extend the if statement if you want check against revisions or other attributes). If both conditions are met then I document.write the javascript variable flashMenu ( which contains the html with object and embed tags) else.... give the user the alternate content.
my variable flashMenu looks like this:
flashMenu = '<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="top" align="left" height="214" width="780">'
flashMenu += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="780" HEIGHT="214" id="fl_header" ALIGN="" swliveconnect="true">';
flashMenu += '<PARAM NAME=movie VALUE="flashUI/fl_header.swf?imgName=fl_image4.swf">';
flashMenu += '<PARAM NAME=loop VALUE=false>';
flashMenu += '<PARAM NAME=menu VALUE=false>';
flashMenu += '<PARAM NAME=quality VALUE=best>';
flashMenu += '<EMBED src="flashUI/fl_header.swf?imgName=fl_image4.swf" loop=false quality=best menu=false bgcolor=#FFFFFF WIDTH="780" HEIGHT="214" NAME="fl_header" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" swliveconnect=true><\/EMBED>';
flashMenu += '<\/OBJECT><\/td><\/tr><\/table>';
my variable htmlMenu looks like this:
htmlMenu = '<table cellpadding="0" cellspacing="0" border="0"><tr><td background="images/header_pic4.jpg" height="214" width="780" align="right" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="481"><tr><td height="7" width="481" colspan="6">[img]images/spacer.gif[/img]<\/td><\/tr><tr><td height="16" width="98"><a href="about_us.asp" onMouseOver="switchImage(\'btnAboutUs\',\'images/btn_aboutUs_over.gif\');" onMouseOut="switchImage(\'btnAboutUs\',\'images/btn_aboutUs.gif\');">[img]images/btn_AboutUs.gif[/img]<\/a><\/td><td height="16" width="94"><a href="products.asp" onMouseOver="switchImage(\'btnProducts\',\'images/btn_products_over.gif\');" onMouseOut="switchImage(\'btnProducts\',\'images/btn_products.gif\');">[img]images/btn_Products.gif[/img]<\/a><\/td><td height="16" width="94"><a href="portfolio.asp" onMouseOver="switchImage(\'btnPortfolio\',\'images/btn_portfolio_over.gif\');" onMouseOut="switchImage(\'btnPortfolio\',\'images/btn_portfolio.gif\');">[img]images/btn_Portfolio.gif[/img]<\/a><\/td><td height="16" width="94"><a href="news.asp" onMouseOver="switchImage(\'btnNews\',\'images/btn_news_over.gif\');" onMouseOut="switchImage(\'btnNews\',\'images/btn_news.gif\');">[img]images/btn_News.gif[/img]<\/a><\/td><td height="16" width="94"><a href="contact_us.asp" onMouseOver="switchImage(\'btnContact\',\'images/btn_contact_over.gif\');" onMouseOut="switchImage(\'btnContact\',\'images/btn_contact.gif\');">[img]images/btn_Contact.gif[/img]<\/a><\/td><td height="16" width="6">[img]images/spacer.gif[/img]<\/td><\/tr><\/table><\/td><\/tr><\/table>';
those are rather complex...but I think you get the point
To see this implementation .... view the source on
http://www.canusa.net
hope this helps some
turtlwaX