I’m trying to make clickable dialog options in a game that I am working on. Whatever I try to do comes up in an error apparently because it says I can’t use the add function. I tried importing various packages into the class, but nothing seems to be working.
package {
import net.flashpunk.FP;
import net.flashpunk.Entity;
import net.flashpunk.World;
import net.flashpunk.graphics.Image;
public class ChoiceBox1 extends Entity {
[Embed('assets/choicebox.png')] private const CHOICEBOX:Class;
public function ChoiceBox1(textchoice:String) {
super(700, 200);
graphic = new Image(CHOICEBOX);
add (new DialogTextLine1(710, 200, textchoice));
}
}
}
Thank you for your help