xxxxxxxxxx
53
var img, imgEarth;
function preload ()
{
img = loadImage("lunar.jpg");
imgEarth = loadImage("earth.png");
}
function setup()
{
createCanvas(800, 800);
//imgMode(CENTER)
imgEarth.resize (100,100);
x = 1;
y = 2;
var speedx = 1;
//speedy = 1;
/// inputy = yy;
// inputx = xx;
}
function draw()
{
background(220);
image(img,0,0);
image(imgEarth,x, y);
if (250 < mouseX = x;&& mouseX 350 && 0 < mouseY && mouseY < 100 ){
}
mouseX = x;
mouseY = y;
tint(255,128);
if(mouseIsPressed && mouseButton == LEFT ) {
noTint();
}
}