0

我正在尝试以下内容:

shape1.canvas1.addEventListener(MouseEvent.MOUSE_MOVE, paintLine);

this["shape"+i].canvas[i].addEventListener(MouseEvent.MOUSE_MOVE, paintLine);

这样的事情可能吗?

4

1 回答 1

0

您的代码应该是:

this["shape"+i]["canvas"+j].addEventListener(MouseEvent.MOUSE_MOVE, paintLine);
         // or ["canvas"+i]  
于 2012-07-07T14:55:30.580 回答