In my code below i have left if mouse it clicked, the __ blank because I am not sure how to make this string of text or I suppose actor, go away once it has been clicked. Can anyone tell me what I should put or use to make the actor/sting disappear once it has been clicked on by the mouse?
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.awt.Color;
import java.awt.Font;
public class Instructions extends Actor
{
// Create image with text. Text is in white with black image background.
private Font textFont = new Font("TimesRoman", Font.BOLD,18);
public Instructions()
{
String longString = "some long text"
+ System.getProperty("line.separator") +" some more long text";
setImage(new GreenfootImage( longString , 18, Color.WHITE, Color.BLUE));
if (Greenfoot.mouseClicked(this)){
}
}
}
