I have a question class. Each question can have child questions. And each question will have a parent question. My parent variable works fine but it seems that no matter what, my array is static. In other words, each of my Questions are sharing the same Children array. Is this a bug/feature or am I just missing something here?
Question.as
-Dustin
Rom 8:28
Question.as
Code:
class Question {
var QText:String;
var QValue:String;
var QID:String;
var ParentID:String;
private var Parent:Question;
private var Children:Array = new Array();
function Question() {
trace("new question");
}
function addChild(childQuestion:Question) {
this.Children.push(childQuestion);
trace(this.Children.length);
}
}
-Dustin
Rom 8:28