Hello!
I'm working on a car game and I ran into a problem with getting images to appear when i need them to. I got the FileNotFound error when I tried to make an image appear. From what I've learned reading these forums, you have to import any images that you want to use directly into the scenario file the project is in. However, I went to the scenarios file and found only a few things, like LunarLanders and stuff like that, not the projects that I've created. Any help would be greatly appreciated. Here's the code I have for the image i want to have appear so far.
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class win here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class win extends Actor
{
/**
* Act - do whatever the win wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
reset();
}
public void reset()
{
if (isTouching(Player1.class))
{
getWorld().setBackground(new GreenfootImage("CarGame6.PNG"));
}
}
}

