Here is my code in World:
Title title = new Title();
NextPage nextpage = new NextPage();
/**
* Constructor for objects of class GreenfootWorld.
*
*/
public GreenfootWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 1);
prepare();
if(Greenfoot.mouseClicked(nextpage)) {
title.clearImage();
}
}
I dont have anything in next Page.
in Title i have:
public void act()
{
}
public void clearImage(){
getImage().clear();
}
I'm making a book and I'm trying to clear the title when the nextImage button is clicked. I'm sure I made a simple error because in the Greenfoot API it says clear() is the method. Please respond fast!!!
