This site requires JavaScript, please enable it in your browser!
Greenfoot back
drpepper
drpepper wrote ...

2015/9/16

set background

drpepper drpepper

2015/9/16

#
so i am pretty new to java and greenfoot, so i don't know a lot about it. but what im trying to do is when you press like the letter b on your keyboard that the background changes to the next background, i have been trying things out with the setbackground command but i cant get it to work, every time i press b i get an error that it cant find the file. can anyone help me with this? thanks in advance!
danpost danpost

2015/9/16

#
The image files must be copied into the 'images' folder of the scenario folder. You can do this outside of greenfoot using your windows browser or by manually setting each image as the world background image by using the following steps for each image: 1) right click on world 2) select 'Set image...' 3) click on the 'Import file...' button 4) select the file to import in the browser After all possible images are imported, re-select the initial image for the background. If you still have problems with finding the file, show the code you are using and the error message you are getting.
drpepper drpepper

2015/9/18

#
well the problem was, i wanted to be able to change to background while running. like when i press the b button, i shifts to the next on, and that where i get the error
Super_Hippo Super_Hippo

2015/9/18

#
Show the code you tried. Then we can see what you have done. That is easier than to guess what you did wrong.
You need to login to post a reply.