Hello, you wonderful AS3 gurus. You have already been so helpful that I am back.
I am building a dice game. I need to clear the stage between rolls of the dice. I can tell Actionscript to remove children as the first step in a new roll. My question is - how do I make it ignore this command if it is, in fact, the first roll and so there are no children on the stage?
Right now, I begin my code with
function rollDice(MouseEvent):void {
if (open_screen.contains(Die)) {
removeChild(Die);
}
but I get the message “TypeError: Error #2007: Parameter child must be non-null.”
Do you have any suggestions?