xxxxxxxxxx
28
var url, winName, options;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
rect(width/2,height/2,50,50);
fill(0);
}
function mousePressed(){
//range accounting for text length
// window.open("http://www.google.com", _self);
fill(255,0,0);
link("http://www.google.com");
}
function link(url, winName, options) {
window.open(url, winName);
}