Add AS2 flash detection code

bug/bundler_fix
jvazquez-r7 2015-07-13 18:26:02 -05:00
parent 8fb6bedd94
commit b72ba7f51c
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
6 changed files with 129 additions and 0 deletions

Binary file not shown.

Binary file not shown.

39
external/source/flash_detector/bin/index.html vendored Executable file
View File

@ -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>

File diff suppressed because one or more lines are too long

View File

@ -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
external/source/flash_detector/src/Main.as vendored Executable file
View File

@ -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 ""
}
}
}