From 753f60c7d4769fa72d3b910e491f37db6f130898 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Aug 2013 17:19:21 -0500 Subject: dymaxion --- .../demo/animation-2b/audio/bonk.mp3 | Bin 0 -> 3342 bytes .../demo/animation-2b/audio/fingerplop.mp3 | Bin 0 -> 3760 bytes .../demo/animation-2b/audio/fingerplop2.mp3 | Bin 0 -> 2088 bytes .../demo/animation-2b/css/animation.css | 36 ++++++++ .../demo/animation-2b/image/ball.gif | Bin 0 -> 549 bytes .../demo/animation-2b/image/point.png | Bin 0 -> 1938 bytes .../demo/animation-2b/index.html | 21 +++++ .../demo/animation-2b/script/animation.js | 94 +++++++++++++++++++++ 8 files changed, 151 insertions(+) create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/bonk.mp3 create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop.mp3 create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop2.mp3 create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/css/animation.css create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/ball.gif create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/point.png create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/index.html create mode 100755 docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/script/animation.js (limited to 'docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b') 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 Binary files /dev/null and b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/bonk.mp3 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 Binary files /dev/null and b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop.mp3 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 Binary files /dev/null and b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/audio/fingerplop2.mp3 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 Binary files /dev/null and b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/ball.gif 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 Binary files /dev/null and b/docs/dymaxion/soundmanagerv297a-20101010/demo/animation-2b/image/point.png 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 @@ + + + + + + + + + +
+ +

SoundManager 2 demo: A Noisy Page

+

Example of sound tied to javascript/DOM event handlers

+ +

Click and drag for fun.

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