Add AS2 flash detection code
This commit is contained in:
Executable
BIN
Binary file not shown.
BIN
Binary file not shown.
+39
@@ -0,0 +1,39 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<title>flash_detector</title>
|
||||||
|
<meta name="description" content="" />
|
||||||
|
|
||||||
|
<script src="js/swfobject.js"></script>
|
||||||
|
<script>
|
||||||
|
var flashvars = {
|
||||||
|
};
|
||||||
|
var params = {
|
||||||
|
menu: "false",
|
||||||
|
scale: "noScale",
|
||||||
|
allowFullscreen: "true",
|
||||||
|
allowScriptAccess: "always",
|
||||||
|
bgcolor: ""
|
||||||
|
};
|
||||||
|
var attributes = {
|
||||||
|
id:"flashdetector"
|
||||||
|
};
|
||||||
|
swfobject.embedSWF(
|
||||||
|
"flashdetector.swf",
|
||||||
|
"altContent", "100%", "100%", "8.0.0",
|
||||||
|
"expressInstall.swf",
|
||||||
|
flashvars, params, attributes);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
html, body { height:100%; overflow:hidden; }
|
||||||
|
body { margin:0; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="altContent">
|
||||||
|
<h1>flash_detector</h1>
|
||||||
|
<p><a href="http://www.adobe.com/go/getflashplayer">Get Adobe Flash player</a></p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+4
File diff suppressed because one or more lines are too long
+55
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<!-- Output SWF options -->
|
||||||
|
<output>
|
||||||
|
<movie disabled="False" />
|
||||||
|
<movie input="" />
|
||||||
|
<movie path="bin\flashdetector.swf" />
|
||||||
|
<movie fps="30" />
|
||||||
|
<movie width="800" />
|
||||||
|
<movie height="600" />
|
||||||
|
<movie version="8" />
|
||||||
|
<movie background="#FFFFFF" />
|
||||||
|
</output>
|
||||||
|
<!-- Other classes to be compiled into your SWF -->
|
||||||
|
<classpaths>
|
||||||
|
<class path="src" />
|
||||||
|
</classpaths>
|
||||||
|
<!-- Build options -->
|
||||||
|
<build>
|
||||||
|
<option verbose="False" />
|
||||||
|
<option strict="False" />
|
||||||
|
<option infer="False" />
|
||||||
|
<option useMain="True" />
|
||||||
|
<option useMX="False" />
|
||||||
|
<option warnUnusedImports="False" />
|
||||||
|
<option traceMode="FlashConnectExtended" />
|
||||||
|
<option traceFunction="" />
|
||||||
|
<option libraryPrefix="" />
|
||||||
|
<option excludeFile="" />
|
||||||
|
<option groupClasses="False" />
|
||||||
|
<option frame="1" />
|
||||||
|
<option keep="True" />
|
||||||
|
</build>
|
||||||
|
<!-- Class files to compile (other referenced classes will automatically be included) -->
|
||||||
|
<compileTargets>
|
||||||
|
<compile path="src\Main.as" />
|
||||||
|
</compileTargets>
|
||||||
|
<!-- Assets to embed into the output SWF -->
|
||||||
|
<library>
|
||||||
|
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
|
||||||
|
</library>
|
||||||
|
<!-- Paths to exclude from the Project Explorer tree -->
|
||||||
|
<hiddenPaths>
|
||||||
|
<!-- example: <hidden path="..." /> -->
|
||||||
|
</hiddenPaths>
|
||||||
|
<!-- Executed before build -->
|
||||||
|
<preBuildCommand />
|
||||||
|
<!-- Executed after build -->
|
||||||
|
<postBuildCommand alwaysRun="False" />
|
||||||
|
<!-- Other project options -->
|
||||||
|
<options>
|
||||||
|
<option showHiddenPaths="False" />
|
||||||
|
<option testMovie="Default" />
|
||||||
|
</options>
|
||||||
|
</project>
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
import flash.external.ExternalInterface
|
||||||
|
import System.capabilities
|
||||||
|
|
||||||
|
class Main
|
||||||
|
{
|
||||||
|
|
||||||
|
public static function main(swfRoot:MovieClip):Void
|
||||||
|
{
|
||||||
|
// entry point
|
||||||
|
var app:Main = new Main();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function Main()
|
||||||
|
{
|
||||||
|
var version:String = getVersion()
|
||||||
|
ExternalInterface.call("setFlashVersion", version)
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getVersion():String
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
var version:String = capabilities.version
|
||||||
|
version = version.split(" ")[1]
|
||||||
|
version = version.split(",").join(".")
|
||||||
|
return version
|
||||||
|
} catch (err:Error) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user