hello!!! so i'm planning to set a background, but the moment i press run, it changes. does anyone know how to do this? thank you so much
public void started()
{
setBackground(<< new background filename >>);
}
public class bg extends World
{
//GreenfootSound backgroundMusic = new GreenfootSound("music.mp3");
public void started()
{
setBackground("start.png");
GreenfootImage bg = new GreenfootImage("start.png");
bg.scale(getWidth(), getHeight());
}
public bg()
{//this sets the background
super(600, 400, 1);
setBackground("Final ICT BG.png");
//backgroundMusic.playLoop();
GreenfootImage bg = new GreenfootImage("Final ICT BG.png");
bg.scale(getWidth() +35, getHeight() +30);
setBackground(bg);
prepare();
//if("enter".equals(Greenfoot.getKey()));
}public class bg extends World
{
public bg()
{
super(600, 400, 1);
GreenfootImage bg = new GreenfootImage("Final ICT BG.png");
bg.scale(600, 400);
setBackground(bg);
prepare();
}
public void started()
{
GreenfootImage bg = new GreenfootImage("start.png");
bg.scale(600, 400);
setBackground(bg);
}
//...