i = 4;
onEnterFrame = function () {
[$nbsp][$nbsp]if (_root.box.boxi.hitTest(_root.s) == true) {
[$nbsp][$nbsp][$nbsp][$nbsp]_root.box.stop();
[$nbsp][$nbsp][$nbsp][$nbsp]xo = i;
[$nbsp][$nbsp]} else {
[$nbsp][$nbsp][$nbsp][$nbsp]_root.box._y = _root.box._y-5;
[$nbsp][$nbsp]}
};
我想要做的是让 i=4 然后 boxi= box4 这个效果
因为是字符型+数字型 的组合
我尝试了一下
i=4
y= eval("box"+i)
然后y代替boxi
if (_root.box.y.hitTest(_root.s) == true)
但是结果还是辨别不出 boxi=box4
这是为什么?