Iw been looking for a detect flash cod scrip for HTML and found a zip file containing files from http://www.adobe.com/products/flashplayer/download/detection_kit/
thats looks great except im not sure how it works, so im hoping somebody can help me.
Here is the code thats in the HTML:
<!-- saved from url=(0013)about:internet -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Client Detection Example</title>
<script src="AC_OETags.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------
// -->
</script>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<!--
// Version check based upon the values entered above in "Globals"
var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
// Check to see if the version meets the requirements for playback
if (hasReqestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "example",
"width", "550",
"height", "200",
"align", "middle",
"id", "detectionExample",
"quality", "high",
"bgcolor", "#FFFFFF",
"name", "detectionExample",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.<BR>'
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
// -->
</script>
<noscript>
Provide alternate content for browsers that do not support scripting
or for those that have scripting disabled.
Alternate HTML content should be placed here.
This content requires the Adobe Flash Player and a browser with JavaScript enabled.
<a href="http://www.adobe.com/go/getflash/">Get Flash</a>
</noscript>
</body>
</html>
I get that it checks after flash 8 and if u dont got it u will get the text in the same index window, right? >>
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.<BR>'
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
but since i dont fully understand the script im hoping someone can help me clean it up. Do i really need the function AC_FL_RunContent? Cant it just be like if (hasReqestedVersion) = nothing happens. And also i dont fully understand >>
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.<BR>'
Does this mean that i can place a img here or what?
Would be great if someone could help me, and maybe clean it up as much as possible. Im also sending the .js file since in not sure if u need that to to change stuff in the cod
as i said, would be VERY nice if someone could help me