无法访问movieclip内的文本字段



我有一个电影剪辑符号,它是从实例名为"text2"的动态文本字段转换而来的。当我尝试将其作为子项添加,然后尝试访问文本字段时,编译器抛出:

错误#1009:无法访问null对象引用的属性或方法。

var test = new Qwe(); //Qwe is the movie clip converted from dynamic text field
addChild(test);
test.text2.text ="535";  //instance name of the text field was text2.

罪魁祸首是Adobe Animate中的"高级层"设置。关掉它,解决了问题。

最新更新