I haven't studied your code in depth - however, I would say this this
is wrong (whatever you are doing):

private function handleMouseMove(event:MouseEvent):void {
               // XXX trying to reuse the MOUSE_MOVE event
               // XXX and to dispatch it to PlayingTable - fails :-(

               dispatchEvent(event);
       }

The Flash event system doesn't like redispatching the same event
object. To redispatch an event like this, try the following:

private function handleMouseMove(event:MouseEvent):void {
               // XXX trying to reuse the MOUSE_MOVE event
               // XXX and to dispatch it to PlayingTable - fails :-(

               dispatchEvent(event.clone());
       }

HTH,
   Ian

On Sun, Dec 28, 2008 at 10:16 AM, Cor <[email protected]> wrote:
> I think your event is bubbling.
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] 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 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 same handler functions.
>
> My problem with the MouseEvent.CLICK
> is however that I receive it twice -
> 1 event comes from the PlayingCard
> and another one seems to be dispatched
> automatically.
>
> Is there please a way to prevent the
> latter event from being sent?
>
> Thank you
> Alex
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.10.0/1866 - Release Date: 27-12-2008
> 20:49
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to