Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-29 Thread Paul Andrews
- Original Message - From: "Alexander Farber" To: "Flash Coders List" 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 rephrase my question, maybe someone wil

[Flashcoders] AS3: Dispatching events to further listeners ...

2008-12-28 Thread SJF
You may need to look at: stopPropagation() and stopImmediatePropagation() Could also have to do with event bubbling, and what phase these events are firing at. Here is a link to get you started: http://www.flashscript.biz/flashas3/eventbubble/event_bubbling_2.html Also, I suggest tracing out the

Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-28 Thread Matthew Muller
Mousechildren = false ? Sent from my iPhone On 28 Dec 2008, at 10:13, "Alexander Farber" 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 MouseEvent.CLICK I do it because in

Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-28 Thread Ian Thomas
...@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 to further listeners, but > not to itself > > Hello, > >

RE: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-28 Thread Cor
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

Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-28 Thread Alexander Farber
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 s

Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-23 Thread Joel Stransky
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 start

Re: [Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-23 Thread allandt bik-elliott (thefieldcomic.com)
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 rathe

[Flashcoders] AS3: Dispatching events to further listeners, but not to itself

2008-12-23 Thread Alexander Farber
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