Hello, this is the problem.
Im making tile-based game in as3. I have hero class. He needs an access to tile objects, but I just cant do it. All objects are made from document class constructor. In hero class I did this to reference the main stage:
public class Hero extends MovieClip
{
private var mc_stage:Stage;
public function Hero(stageRef:Stage)
{
mc_stage = stageRef;
trace(mc_stage.tile0_0.walkable);
}
}
So when I was creating hero object, I did
new Hero(this.stage);
This referenced main stage to hero class, but how can I get other objects from stage?
Tracing gives me this error:
1119: Access of possibly undefined property tile0_0 through a reference with static type flash.display:Stage.