- Original Message -
From: Alexander Farber alexander.far...@gmail.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Sunday, December 28, 2008 10:13 AM
Subject: Re: [Flashcoders] AS3: Dispatching events to further listeners,but
not to itself
Hello,
may I please
Hello,
may I please rephrase my question,
maybe someone will have a hint for me?
By my PlayingCard objects I'd like to
dispatch 2 events: Event.CHANGE
and MouseEvent.CLICK
I do it because in my game you can
drag cards, but also you can select
them from a list and click a button.
So I could use
I think your event is bubbling.
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander
Farber
Sent: zondag 28 december 2008 11:14
To: Flash Coders List
Subject: Re: [Flashcoders] AS3: Dispatching events
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander
Farber
Sent: zondag 28 december 2008 11:14
To: Flash Coders List
Subject: Re: [Flashcoders] AS3: Dispatching events to further listeners, but
not to itself
Hello,
may I please rephrase my question,
maybe someone
Mousechildren = false ?
Sent from my iPhone
On 28 Dec 2008, at 10:13, Alexander Farber
alexander.far...@gmail.com wrote:
Hello,
may I please rephrase my question,
maybe someone will have a hint for me?
By my PlayingCard objects I'd like to
dispatch 2 events: Event.CHANGE
and
Hello,
I have 2 classes: PlayingCard and PlayingTable.
The PlayingCard listens on MOUSE_UP, DOWN
and MOVE to call startDrag() and stopDrag().
I do not want to introduce custom events,
so I try to subscribe the PlayingTable to
MOUSE_MOVE and MOUSE_UP events
of each PlayingCard, so that the table
you might find that using MOUSE_MOVE is a little heavy on the processor as
it can fire multiple times, even within the same frame
it's probably better to use Event.ENTER_FRAME and check for the mouseX and
mouseY and while you're at it, you might as well use the same listener to
move the card
Why not just include the detection logic inside the handlers you already
have?
On Tue, Dec 23, 2008 at 9:52 AM, Alexander Farber
alexander.far...@gmail.com wrote:
Hello,
I have 2 classes: PlayingCard and PlayingTable.
The PlayingCard listens on MOUSE_UP, DOWN
and MOVE to call startDrag()
8 matches
Mail list logo