我正在尝试以下内容:
shape1.canvas1.addEventListener(MouseEvent.MOUSE_MOVE, paintLine);
到
this["shape"+i].canvas[i].addEventListener(MouseEvent.MOUSE_MOVE, paintLine);
这样的事情可能吗?
答案 0 :(得分:0)
您的代码应为:
this["shape"+i]["canvas"+j].addEventListener(MouseEvent.MOUSE_MOVE, paintLine);
// or ["canvas"+i]