xxxxxxxxxx
var ghost, asterisk;
var centreX, centreY;
function preload() {
ghost = loadAnimation('ghost_standing0001.png', 'ghost_standing0007.png');
asterisk = loadAnimation('asterisk.png', 'triangle.png', 'square.png', 'cloud.png', 'star.png', 'mess.png', 'monster.png');
}
function setup() {
createCanvas(windowWidth, windowHeight);
centreX = windowWidth/2;
centreY = windowHeight/2;
}
function draw() {
background(255, 255, 255);
animation(ghost, 300,centreY );
animation(asterisk, 500, centreY);
}