I’m adapting a Flash page to show alternative content when Flash is not available, however, the method it uses is not really ideal for a full-on alternative page with lots of content. Currently, the alternative content is served like this:
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
}
The new content I want to serve is much, much bigger than the “get Flash” message, however.
Is there a better way to serve up a lot of HTML (and javascript)? Via an include of some sort? I’m not sure I want to do any sort of redirect – or do I?
The best way is to use SWFObject,
have a div with your alternate system inside in then use SWFObject to load the flash player inside that div if flash player is installed
Look at : How to embed Flash Player content using SWFObject dynamic publishing on this page: http://code.google.com/p/swfobject/wiki/documentation
Under : How can you use HTML to configure your Flash content?
You need to feed them into your parameters,
Then feed that prams into your loader line