我有问题。我尝试调用movieclip中的函数,但它不起作用。我有6分(动画片段),我在主时间轴上的代码是:
var point1 = this.point1;
var point2 = this.point2;
var point3 = this.point3;
var point4 = this.point4;
var point5 = this.point5;
var point6 = this.point6;
var points = [point1, point2, point3, point4, point5, point6];
for (var i = 0; i < points.length; i++) {
points[i].resetPoint();
}
这是我在每个点内的函数,它是一个movieclip的副本并且命名正确:
this.resetPoint = function() {
console.log("reset");
}
当我发布项目并在浏览器中运行时,我收到错误:
未捕获的TypeError:points [i] .resetPoint不是函数
有人可以帮我吗?