PDA

View Full Version : Dynamic Mc access to stage



flippant
May 17th, 2007, 05:51 AM
I have a Document Class named is StageControl.
Class path is com.magazine.tool.StageControl;

StageControl working perfectly. But im dynamic creating (linkage) a mc in container movie clip.

var content_mc:textSmall = new textSmall();
container.addChild(content_mc);

problem is, i have an scripts in content_mc frame1. I want to access root.tempText.

trace(stage.root.tempText);
trace(root.tempText);

root code:
var tempText:String = "test";

error code:
1119: Access of possibly undefined property tempText through a reference with static type flash.display:DisplayObject.


please help me this question.

geoken
May 17th, 2007, 08:14 AM
I have the exact same question except I'm trying to execute a function from within the child clip. I was thinking the ultimate answer would be to create a public function. Does anyone know if there is a way to create a public function from within the flash authoring tool.

Breen
May 17th, 2007, 08:24 AM
Delete the

"trace(root.tempText);"

You should be fine then