How to stop Mouse Out event on Flex Canvas firing for child elements

前端 未结 3 2006
难免孤独
难免孤独 2021-01-19 13:16

I am using a Canvas itemRenderer for a container I use to display images. See pseudo code below.

image = new Image();
image.source = data.@thumb;
this.addChi         


        
3条回答
  •  春和景丽
    2021-01-19 13:41

    You should use MouseEvent.ROLL_OVER and MouseEvent.ROLL_OUT events instead.

    From the Flash CS4 documentation:

    When the mouse enters the area of a display object or the area of any of its children from an object that is not one of its children, the display object dispatches the rollOver event. This is different behavior than that of the mouseOver event, which is dispatched each time the mouse enters the area of any child object of the display object container, even if the mouse was already over another child object of the display object container.

提交回复
热议问题