我有一个影片剪辑符号,该符号是我从动态文本字段转换而成的,实例名称为“ 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.
罪魁祸首是Adobe Animate中的“高级图层”设置。关闭它,解决了问题。