xxxxxxxxxx
63
// var sound;
var button;
// function preload() {
// sound = loadSound('sandstorm.mp3');
function setup() {
canvas = createCanvas(400, 400);
button = createButton('DO NOT PUSH');
button.size(90, 90);
button.position(400, 400);
button.mousePressed(next);
}
function draw() {
}
function next() {
background(0);
button = createButton('ARE YOU SURE?');
button.size(90, 90);
button.position(400, 400);
button.mousePressed(next2);
}
function next2() {
background(0);
button = createButton('ARE YOU REALLY SURE?');
button.size(90, 90);
button.position(400, 400);
button.mousePressed(surprise);
}
function surprise() {
background(0);
button = createButton('STOP THIS MADNESS');
button.size(90, 90);
button.position(400, 400);
button.mousePressed(end);
// sound.play();
// sound.loop();
for (var x = 0; x <= width; x += 25) {
for (var y = 0; y <= height; y += 25) {
noStroke();
fill(random(0, 255), random(0, 255), random(0, 255), random(0, 255));
ellipse(random(0, 400), random(0, 400), 40, 40);
}
}
}
function end() {
background(0);
// sound.stop();
}