If you're listening for MouseEvent.CLICK, you're not going to get it
when the mouse pointer simply enters anything. You get it only when you
click the mouse button!
 
If you want to detect entering and leaving sprites, use
MouseEvent.ROLL_OVER and MouseEvent.ROLL_OUT.
 
- Gordon

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jairokan
Sent: Sunday, May 27, 2007 6:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] My problems with Events



Hi,
I'm doing a little application example while learning different
topics. I'm in the Events topic now ,which I'm still struggling to
understand (Capture, bubble phases). The application is very simple
having a display list as follows.
MainSprite
ChildSprite
TextField

The Child Sprite has a certain dimension width, height. It contains
the Text Field, width also dimension set smaller than Child Sprite.
I've added an EventListener to the Child Sprite, the Event type is
CLICK. The event handler will change the backgroung of the Child Sprite.

The problem is that the event is triggered only if the mouse pointer
enters the TextFiled area, which is a non expected behaviour. The
Event should be dispatched as soon as the mouse pointer enters the
Child Sprite area. 
Can please someone explain brievely if this is the correct behaviour
and what should I do to trigger the handler event as soon as the mouse
pointer enters the Child Sprite are, not until it goes the the text
field area.
Thanks 



 

Reply via email to