createButton() seems to be ‘undefined’
This is a problem with the recent release of p5.js (v0.7.1), not the editor, although the editor recently updated to point to that recent version. It is staged to be fixed in the next version
https://github.com/processing/p5.js/issues/3141
Currently the .mousePressed() listener isn't working.
Can you use .mouseClicked() for your project?
I've noticed this as well. As a temporary workaround, you can go into the index.html file and change the p5.js library to point to 0.7.2:
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.dom.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.sound.min.js"></script>
Also, here is a sketch you can "duplicate" with the change made:
https://editor.p5js.org/codingtrain/sketches/SyvvHLa_X
@catarak I suppose we should move to 0.7.2 as the default?
today i will update the default p5 version to 0.7.2. unfortunately i still have to do it manually—haven't figured out an easy way for it to not be manual!
yes, mouseClicked() works,
also updating index.html to 0.7.2 fixed createButton() issue.
thanks everyone.
Most helpful comment
I've noticed this as well. As a temporary workaround, you can go into the
index.htmlfile and change the p5.js library to point to0.7.2:Also, here is a sketch you can "duplicate" with the change made:
https://editor.p5js.org/codingtrain/sketches/SyvvHLa_X
@catarak I suppose we should move to
0.7.2as the default?