Flex Bitmapimage图形鼠标单击错误

时间:2012-09-20 18:23:55

标签: actionscript-3 flex

我添加了一个BitmapImage作为Graphic元素:

var bmp:BitmapImage = new BitmapImage();
var g:Graphic = new Graphic();

g.addElement(bmp);
myCanvas.addChild(g);

现在,在BitmapImage左侧或顶部的Mouse Click事件中,event.targetg作为目标而不是画布。当我没有点击BitmapImage时,为什么event.target指向g

1 个答案:

答案 0 :(得分:0)

event.target不必总是指向您单击的对象。使用event.currentTarget获取发生单击交互的对象的引用。请参阅livedocs.adobe.com了解更多详情。

相关问题