Permalink
Browse files

link improvements

  • Loading branch information...
1 parent b73b1a4 commit 1fb3d819cc6dc691f7f7a3dac29aeb1311589837 @egonelbre egonelbre committed Feb 7, 2011
Showing with 10 additions and 3 deletions.
  1. +4 −2 demo/index.html
  2. +6 −1 lib/jsfxgui.js
View
@@ -105,7 +105,7 @@
</div>
</div>
<div>
- <input type="text" id="libload" value='["noise",0.0000,0.4000,0.0000,0.0060,0.0000,0.1220,20.0000,460.0000,2400.0000,-0.5240,0.0000,0.0000,0.0100,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.9990,0.0000,0.0000,0.0000,0.0000]'></input><button onclick="jsfxgui.paramsFromField()">Load</button>
+ <input type="text" id="libload" value='["noise",0.0000,0.4000,0.0000,0.0060,0.0000,0.1220,20.0000,460.0000,2400.0000,-0.5240,0.0000,0.0000,0.0100,0.0003,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.9990,0.0000,0.0000,0.0000,0.0000]'></input><button onclick="jsfxgui.paramsFromFieldAndPlay()">Load</button>
&nbsp;
<a href="#" id="link">link</a>
<br />
@@ -164,8 +164,10 @@
}
var val = document.$_GET['load'];
- if(val !== undefined)
+ if(val !== undefined){
document.getElementById('libload').value = val.replace(/%22/g,'"');
+ jsfxgui.paramsFromField();
+ }
</script>
</body>
</html>
View
@@ -436,7 +436,12 @@ var jsfxgui = {};
arr = str.replace(/\[|\]|\"/g,"").split(","),
params = jsfxlib.arrayToParams(arr);
this.setParams(params);
- this.play();
}
+ this.paramsFromFieldAndPlay = function(){
+ if (fldDiv === undefined) return;
+ this.paramsFromField();
+ this.play();
+ }
+
}).apply(jsfxgui);

0 comments on commit 1fb3d81

Please sign in to comment.