Javascript 如何从CreateJS/Adobe Animate电影框架内部正确设置HTML文本输入字段的默认值?

Javascript 如何从CreateJS/Adobe Animate电影框架内部正确设置HTML文本输入字段的默认值?,javascript,createjs,animate-cc,Javascript,Createjs,Animate Cc,我正在尝试为使用Adobe Animate CC 2020创建的HTML5/JS电影的TextInput控件设置默认值 // FRAME 0 var _this = this; //this is the default approach from the "wizard" and does not work _this.txtCompany.on('added', function() { $('#txtCompany').val("Dunder Mi

我正在尝试为使用Adobe Animate CC 2020创建的HTML5/JS电影的TextInput控件设置默认值

// FRAME 0

var _this = this;

//this is the default approach from the "wizard" and does not work
_this.txtCompany.on('added', function() {
    $('#txtCompany').val("Dunder Mifflin");
    console.log("inside");
}, _this, true);

// this also does not work with a single frame
$('#txtCompany').val('ACME Corp');
console.log("outside");
运行上面的简单电影会将“outside”放入控制台日志,但不会在表单字段中设置文本值

但是,如果我创建第二个帧并放入:

// FRAME 1
var _this = this;
_this.gotoAndStop(0);
使用额外的帧运行此新电影,并循环回第一帧,值被正确设置为ACME Corp.
console.log(“内部”)
永远不会执行,但
console.log(“外部”)
会运行两次。在帧
added
事件上运行此操作的“正确”方式永远不会被调用


为什么这不起作用,为什么代码“向导”会建议一个不可用的实现?

我宁愿在一些帧更改事件处理程序中检查类似于
currentFrame
的内容,因为添加的
事件似乎只有在DOM树中创建元素时才会触发。你能提供一个最低限度的例子吗?