rafaelmaeuer
2/16/2017 - 4:17 PM

Flash to Processing Communication - From http://incubator.quasimondo.com/processing/flash_processing_communication_1.php

function onSlider(slider) {
   var v = Math.round(slider.getValue());
   if (v != this.lastV) {
      this.lastV = v;
      blur_txt.text = "Blur Radius: "+v;
      clearInterval(this.sID);
      this.sID=setInterval(this,"sendSlider",100,v);
   }
}

function sendSlider(v){
   clearInterval(this.sID);
   fscommand("onSliderChanged", v);
}