错误ActionScript3:未找到类型或不是编译时常量:CheckBox

时间:2013-03-12 11:03:52

标签: actionscript-3 intellij-idea

在尝试使用其他课程中的某些组件时,我遇到了一些麻烦。!

我有一个类型为CheckBox的数组。此类CheckBox来自我导入到项目的另一个模块项目。我第一次执行时工作得很好,但是现在,它不再起作用了......

//class scope

private var _combinationArray:Array.CheckBox;

//constructor scope

_combinationArray = new Array.CheckBox();
_combinationArray[0] = _checkBoxPvrtc;
_combinationArray[1] = _checkBoxEtc1;
_combinationArray[2] = _checkBoxDxt15;

当我执行我的程序时,我收到此错误:找不到类型或不是编译时常量:CheckBox。该行 private var _combinationArray:Array.CheckBox;

的错误点完全正确

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

private var _combinationArray:Vector.<CheckBox>;

_combinationArray = new Vector.<CheckBox>();

应该这样做。只是Array是严格无类型的,而Vector是严格键入的。