无法访问动画片段内的文本字段

时间:2019-10-24 18:48:40

标签: actionscript-3 flash adobe textfield movieclip

我有一个影片剪辑元件,它是从动态文本字段转换为实例名称“ text2”的。当我尝试将其添加为子项,然后尝试访问文本字段时,编译器将抛出:

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

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.

1 个答案:

答案 0 :(得分:1)

罪魁祸首是Adobe Animate中的“高级图层”设置。关闭它可以解决问题。