xxxxxxxxxx
27
function setup(){
createCanvas (640, 360);
launcher = loadImage("launcherone.png");
sun = loadImage("favicon.png");
image(launcher, 0, 0);
Info = createP("Take Off");
Info.mouseOver(overpara);
Info.mouseOut(outpara);
}
function draw(){
background(0);
launcher.resize(200, 100);
imageMode(CENTER);
image(launcher, mouseX,mouseY);
}
function overpara() {
// change p element's html content
Info.html('Launch Your Satellite');
}
function outpara(){
Info.html("Take Off");
}