我正在调整 Flash 页面以在 Flash 不可用时显示替代内容,但是,它使用的方法对于具有大量内容的完整替代页面并不理想。目前,替代内容的服务方式如下:
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
// embed the flash movie
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
'width', '1000',
'height', '688',
'src', 'wot',
//etc, etc...
); //end AC code
}
} else { // flash is too old or we can't detect the plugin
var alternateContent =
'<p> </p>'
+ '<p>This website requires a newer version of the Adobe Flash Player.</p>'
+ '<p> </p>'
+ '<p> </p>'
+ '<p><a href="http://www.macromedia.com/go/getflash/">Get the Latest Flash Player here.</a></p>'
+ '<p><a href="http://www.macromedia.com/go/getflash/"><img src="images/get_flash_player.gif" alt="Download Flash Player" width="88" height="31" border="0" /></a></p>'
+ '<p> </p>'
+ '<p> </p>';
document.write(alternateContent); // insert non-flash content
}
然而,我想要提供的新内容比“获取 Flash”消息要大得多。
有没有更好的方法来提供大量 HTML(和 javascript)?通过某种包含?我不确定我是否想做任何类型的重定向 - 还是我做的?