xxxxxxxxxx
21
var inputBox;
var mytext="";
function setup() {
createCanvas(400, 100);
inputBox = createInput();
inputBox.size(200, 20);
//inputBox.position(2,height-28); //__ put it over canvas
inputBox.input(myInputEvent);
}
function myInputEvent() {
//console.log('log: ', this.value());
mytext = this.value();
}
function draw() {
background(200,200,0);
textSize(30);
text(mytext,10,height/2);
}