summaryrefslogtreecommitdiff
path: root/docs/dymaxion/soundmanagerv297a-20101010/demo/template/html5-dtd-test.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dymaxion/soundmanagerv297a-20101010/demo/template/html5-dtd-test.html')
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/template/html5-dtd-test.html77
1 files changed, 77 insertions, 0 deletions
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/template/html5-dtd-test.html b/docs/dymaxion/soundmanagerv297a-20101010/demo/template/html5-dtd-test.html
new file mode 100755
index 0000000..4d1b102
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/template/html5-dtd-test.html
@@ -0,0 +1,77 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>SoundManager 2: HTML 5 DTD test</title>
+<meta name="description" content="A test page using SoundManager 2 under an HTML 5 DOCTYPE." />
+<script>
+
+// -- Movie size/positioning test case, Firefox/Win32 --
+
+// SM2 normally works at 6x6px SWF size, position:fixed bottom/left:0px.
+// Was failing with this case using HTML 5 doctype? ..
+// Started working when 8x8px SWF size was used.
+
+// Previous notes, courtesy Jacob Seidelin ...
+
+// This fails to load in Firefox 3.6 (Win7) but will load after one of the following changes:
+// 1. Remove the doctype or set it to eg.
+// <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+// 2. Set soundManager.useHighPerformance = false
+// 3. Set soundManager.debugFlash = true
+
+function loadScript(sURL,onLoad) {
+ try {
+ var loadScriptHandler = function() {
+ var rs = this.readyState;
+ if (rs == 'loaded' || rs == 'complete') {
+ this.onreadystatechange = null;
+ this.onload = null;
+ if (onLoad) {
+ onLoad();
+ }
+ }
+ }
+ function scriptOnload() {
+ this.onreadystatechange = null;
+ this.onload = null;
+ window.setTimeout(onLoad,20);
+ }
+ var oS = document.createElement('script');
+ oS.type = 'text/javascript';
+ if (onLoad) {
+ oS.onreadystatechange = loadScriptHandler;
+ oS.onload = scriptOnload;
+ }
+ oS.src = sURL;
+ document.getElementsByTagName('head')[0].appendChild(oS);
+ } catch(e) {
+ // oh well
+ }
+}
+
+window.onload = function() {
+ loadScript('../../script/soundmanager2.js', function() {
+ soundManager.flashVersion = 9;
+ soundManager.flash9Options.useEQData = true;
+ soundManager.flash9Options.useWaveformData = true;
+ soundManager.allowPolling = true;
+ soundManager.url = '../../swf/'; // path to directory containing SoundManager2 .SWF file
+ soundManager.onload = function() {
+ alert('Loaded!');
+ };
+ soundManager.debugMode = true;
+ soundManager.useHighPerformance = true;
+ soundManager.debugFlash = false;
+ soundManager.beginDelayedInit(); // ensure things start, in case document.readyState / domReady are missed (eg. Firefox 3.5.5/win32 with HTML5 DTD, no document.readyState??)
+ });
+}
+
+</script>
+
+</head>
+
+<body>
+
+</body>
+</html>
+