summaryrefslogtreecommitdiff
path: root/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b')
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/bonk.mp3bin0 -> 3342 bytes
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop.mp3bin0 -> 3760 bytes
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop2.mp3bin0 -> 2088 bytes
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/css/animation.css36
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/ball.gifbin0 -> 549 bytes
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/point.pngbin0 -> 1938 bytes
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/index.html21
-rwxr-xr-xdocs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/script/animation.js94
8 files changed, 151 insertions, 0 deletions
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/bonk.mp3 b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/bonk.mp3
new file mode 100755
index 0000000..2bce046
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/bonk.mp3
Binary files differ
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop.mp3 b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop.mp3
new file mode 100755
index 0000000..663155e
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop.mp3
Binary files differ
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop2.mp3 b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop2.mp3
new file mode 100755
index 0000000..10f8bb2
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop2.mp3
Binary files differ
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/css/animation.css b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/css/animation.css
new file mode 100755
index 0000000..2764bc2
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/css/animation.css
@@ -0,0 +1,36 @@
+body {
+ font-size:75%;
+ background:#667788;
+ color:#fff;
+ text-shadow:0 0 0 #fff; /* Safari nonsense */
+}
+
+h1, h2, h3 {
+ font:normal 3em "Helvetica Neue",georgia,"times new roman","Arial Rounded MT Bold",helvetica,verdana,tahoma,arial,"sans serif";
+ font-weight:normal;
+ margin-bottom:0px;
+}
+
+
+h1 {
+ margin-top:0px;
+}
+
+h1, h2 {
+ letter-spacing:-1px; /* zomg web x.0! ;) */
+}
+
+h2 {
+ font-size:2em;
+ margin-top:0.25em;
+}
+
+p {
+ font:normal 1em verdana,tahoma,arial,"sans serif";
+}
+
+.point {
+ position:absolute;
+ width:32px;
+ height:32px;
+} \ No newline at end of file
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/ball.gif b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/ball.gif
new file mode 100755
index 0000000..0f13534
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/ball.gif
Binary files differ
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/point.png b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/point.png
new file mode 100755
index 0000000..043a88f
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/point.png
Binary files differ
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/index.html b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/index.html
new file mode 100755
index 0000000..e51dcf5
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/index.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<link rel="stylesheet" href="css/animation.css" media="screen" />
+<script type="text/javascript" src="../../script/soundmanager2.js"></script>
+<script type="text/javascript" src="script/animation.js"></script>
+</head>
+<body>
+
+<div>
+
+ <h1>SoundManager 2 demo: A Noisy Page</h1>
+ <h2>Example of sound tied to javascript/DOM event handlers</h2>
+
+ <p>Click and drag for fun.</p>
+
+</div>
+
+</body>
+</html>
diff --git a/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/script/animation.js b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/script/animation.js
new file mode 100755
index 0000000..61d2382
--- /dev/null
+++ b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/script/animation.js
@@ -0,0 +1,94 @@
+soundManager.flashVersion = 9;
+soundManager.url = '../../swf/';
+soundManager.useHighPerformance = true;
+soundManager.wmode = 'transparent';
+soundManager.debugMode = false;
+
+var points = [];
+var o = null;
+var lastX = 0;
+var lastY = 0;
+var threshhold = 4;
+var threshMax = 32;
+var noise = null;
+var screenX = 0;
+
+function doPaint(e) {
+ var x = (e||event).clientX;
+ var y = (e||event).clientY;
+ var diff = Math.max(Math.abs(x-lastX),Math.abs(y-lastY));
+ if (diff>threshhold) {
+ lastX = x;
+ lastY = y;
+ points.push(new Point(x,y,Math.min(diff/(32),3)));
+ }
+ return false;
+}
+
+function stopPaint() {
+ document.onmousemove = null;
+ document.onmouseup = null;
+ // soundManager.play('up');
+}
+
+function startPaint(e) {
+ // soundManager.play('down');
+ document.onmousemove = doPaint;
+ document.onmouseup = stopPaint;
+ lastX = (e||event).clientX;
+ lastY = (e||event).clientY;
+ screenX = (window.innerWidth?window.innerWidth:document.documentElement.clientWidth||document.body.clientWidth);
+ e?e.stopPropagation():event.returnValue = false;
+ return false;
+}
+
+function initPoints() {
+ o = document.createElement('img');
+ o.src = 'image/point.png';
+ o.className = 'point';
+ document.onmousedown = startPaint;
+ document.onmouseup = stopPaint;
+}
+
+function Point(x,y,scale) {
+ var self = this;
+ this.data = {
+ x: x,
+ y: y,
+ scale: scale,
+ scalePX: parseInt(32*scale)
+ }
+ this.o = o.cloneNode(false);
+ this.o.style.left = (x-(this.data.scalePX/2))+'px';
+ this.o.style.top = (y-(this.data.scalePX/2))+'px';
+ this.o.style.width = this.o.style.height = this.data.scalePX+'px';
+ var screenX2 = parseInt(screenX/2);
+ noise.play({volume:parseInt(Math.min(1,scale/3)*100),pan:(x<screenX2?(screenX2-x)/screenX2*-100:(x-screenX2)/screenX2*100)});
+ document.body.appendChild(this.o);
+}
+
+soundManager.onload = function() {
+ noise = soundManager.createSound({
+ id:'noise',
+ url:'../animation/audio/fingerplop.mp3',
+ multiShot: true,
+ autoLoad: true
+ });
+ soundManager.createSound({
+ id:'down',
+ url:'../_mp3/click-low.mp3',
+ multiShot: true,
+ autoLoad: true
+ });
+ soundManager.createSound({
+ id:'up',
+ url:'../_mp3/click-high.mp3',
+ multiShot: true,
+ autoLoad: true
+ });
+ initPoints();
+}
+
+soundManager.onerror = function() {
+ alert('d\'oh, something didn\'t work - SM2 failed to start.');
+} \ No newline at end of file