From 753f60c7d4769fa72d3b910e491f37db6f130898 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Aug 2013 17:19:21 -0500 Subject: dymaxion --- .../demo/template/xhtml-test.xhtml | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/template/xhtml-test.xhtml (limited to 'docs/dymaxion/soundmanagerv297a-20101010/demo/template/xhtml-test.xhtml') diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/template/xhtml-test.xhtml b/docs/dymaxion/soundmanagerv297a-20101010/demo/template/xhtml-test.xhtml new file mode 100755 index 0000000..a77db8f --- /dev/null +++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/template/xhtml-test.xhtml @@ -0,0 +1,86 @@ + + + +SoundManager 2 Template + + + + + + + + + + + + + + + + + + + + + +
+

SoundManager 2 Template Example

+

This is a basic template for adding SoundManager to your page.

+

How it works

+

This page includes the SM2 script, which starts up on its own as appropriate. By default it will try to start as soon as possible.

+

The minimal code needed to get SoundManager 2 going is below, with configurable parts:

+ +
+
+<-- include SM2 library -->
+<script type="text/javascript" src="/path/to/soundmanager2.js"></script>
+
+<-- configure it for your use -->
+<script type="text/javascript">
+
+soundManager.url = '/path/to/sm2-flash-movies/'; // directory where SM2 .SWFs live
+
+// Note that SounndManager will determine and append the appropriate .SWF file to the URL.
+
+// disable debug mode after development/testing..
+// soundManager.debugMode = false;
+
+soundManager.onload = function() {
+  // SM2 has loaded - now you can create and play sounds!
+  soundManager.createSound('helloWorld','/path/to/hello-world.mp3');
+  soundManager.play('helloWorld');
+}
+
+</script>
+ +

Making SM2 wait for window.onload()

+

If you prefer to have the library wait for window.onload() before calling soundManager.onload()/onerror() methods, you can modify SM2's "waitForWindowLoad" property:

+soundManager.waitForWindowLoad = true; +

Disabling debug output

+

SoundManager 2 will write to a debug <div> element or a javascript console if available, by default. To disable it, simply set the relevant property to false:

+soundManager.debugMode = false; +

To see related configuration code, refer to the source of this page which basically does all of the above "for real."

+

No-debug, compressed version of soundmanager2.js

+

Once development is finished, you can also use the "minified" (60% smaller) version of SM2, which has debug output and comments removed for you: soundmanager2-nodebug-jsmin.js. If you can, serve this with gzip compression for even greater bandwidth savings!

+ +
+ + + -- cgit v1.2.3-70-g09d2