How do I call a function on a sketch wrapped in processing.js? (SOLVED)

edited July 2015 in JavaScript Mode

I have spent many hours trying to imitate people who have succeeded at this or follow tutorials but I have not been able to make a single program that can do this. The following program is the current state of my efforts: `

document.getElementById("pause").onclick = function () { var pjs = Processing.getInstanceById('ctr'); if ((this).value === 'RESUME') { //pjs.resume(); //Broken Function A this.value = 'PAUSE'; } else if ((this).value === 'PAUSE') { //pjs.pause(); //Broken Function B this.value = 'RESUME'; } }

` You can also see this program here.

The broken functions A & B are the ones that I am unable to get working, they are supposed to call functions in Counter.pde.

If you have any suggestions/help please reply!



  • Answer ✓

    SOLVED it turns out the Processing.js file i was using was bad

Sign In or Register to comment.