You do not have the method start() in your world. Define it (in your world) and the error is gone.
import greenfoot.*; private String menuItem = ""; private boolean menuDone = false; public class Start extends Actor { public void act() { if (!menuDone && !"".equals(menuItem)) { removeObjects(getObjects(Menu.class)); menuDone = true; } } public void setMenuItem(String muItem) { menuItem = muItem; } }
import greenfoot.*; public class Start extends Actor { private String menuItem = ""; private boolean menuDone = false; public void act() { if (!menuDone && !"".equals(menuItem)) { removeObjects(getObjects(Menu.class)); menuDone = true; } } public void setMenuItem(String muItem) { menuItem = muItem; } }
import greenfoot.*; public class Start extends Actor { private String menuItem = ""; private boolean menuDone = false; public void act() { if (!menuDone && !"".equals(menuItem)) { removeObjects(getObjects(Menu.class)); menuDone = true; } } public void setMenuItem(String muItem) { menuItem = muItem; } }
import greenfoot.*; public class Start extends Actor { String caption = ""; public Start(String text) { caption = text; updateImage(); } private void updateImage() { } public void act() { if (Greenfoot.mouseClicked(this)) { World2 mw = (World2) getWorld(); mw.setMenuItem(caption); } } }
import greenfoot.*; public class Start extends Actor { public boolean Start; private String menuItem = ""; private boolean menuDone = false; public void act() { if (!menuDone && !"".equals(menuItem)) { removeObjects(getObjects(Start.class)); menuDone = true; if (Greenfoot.mouseClicked(this)) { World2 mw = (World2) getWorld(); mw.setMenuItem(caption); } } } public void setMenuItem(String muItem) { menuItem = muItem; } String caption = ""; public Start(String text) { caption = text; updateImage(); } private void updateImage() { } }
getWorld().removeObjects(getWorld().getObjects(Start.class));
import greenfoot.*; public class Start extends Actor { public boolean Start; private String menuItem = ""; private boolean menuDone = false; public void act() { if (!menuDone && !"".equals(menuItem)) { getWorld().removeObjects(getWorld().getObjects(Start.class)); menuDone = true; if (Greenfoot.mouseClicked(this)) { World2 mw = (World2) getWorld(); mw.setMenuItem(caption); } } } public void setMenuItem(String muItem) { menuItem = muItem; } String caption = ""; public Start(String text) { caption = text; updateImage(); } private void updateImage() { } }