Oops, seems like I am asking too much question in this forum.... hehe..
So now in the first frame, I put (using the GUI tools) a textfield in flash CS4 and give it an instance name "Status". What I want to do is to update this status from other classes like:
public class Activity extends Sprite {
public function DoIt() {
/* do something */
if(stage!=null) stage.Status.text = "done";
}
}
my problem is that "Status" cannot be accessed. Question: are objects created by the GUI automatically "private"? or what have I done wrong?
Now in the first frame of the fla i add some AS3
var activity:Acitvity = new Activity();
stage.addChild(activity); // makes activity.stage != null
trace(Status.root) // mainTimeLine, so the mainTimeLine is not in DisplayList, not under stage
trace(Status.parent) // mainTimeLine
stage.addChild(Status)// place it on stage, hope activity can access it
trace(Status.root) // stage
trace(Status.parent) // stage
Question: activity still cannot access stage. so what is the difference between mainTimeLine and stage?