动画片段内的禁止访问文本字段

问题描述 投票:0回答:1

我有一个影片剪辑符号,该符号是我从动态文本字段转换而成的,实例名称为“ 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.
actionscript-3 flash adobe textfield movieclip
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.