sh Coders List"
Sent: Wednesday, April 02, 2008 2:22 PM
Subject: Re: [Flashcoders] AS3 MouseEvent target?
which is mouseChildren = false.
In my humble opinion I do not think this is what he needs. He should not be
referencing target, but instead he should reference currentTarget.
If you
This behaviour can not emulated precisely because there is no way for us to
set the target and currentTarget properties. This is done by internal
EventDispatcher code.
The EventDispatcher code works something like this:
- check if the target property of the event has been set, if not set it
- set
> which is mouseChildren = false.
In my humble opinion I do not think this is what he needs. He should not be
referencing target, but instead he should reference currentTarget.
If you are adding a listener, the handlers e.currentTarget will point to the
object that you added the listener to, e.ta
>>From: [EMAIL PROTECTED]
> >>[mailto:[EMAIL PROTECTED] On Behalf
> >>Of Steven Sacks
> >>Sent: Tuesday, April 01, 2008 3:05 PM
> >>To: Flash Coders List
> >>Subject: Re: [Flashcoders] AS3 MouseEvent target?
> >>
> >>Extending Dis
gt;[mailto:[EMAIL PROTECTED] On Behalf
>>Of Steven Sacks
>>Sent: Tuesday, April 01, 2008 3:05 PM
>>To: Flash Coders List
>>Subject: Re: [Flashcoders] AS3 MouseEvent target?
>>
>>Extending DisplayObject to access some of its native
>>functionality
Extending DisplayObject to access some of its native functionality (e.g.
event bubbling) seems fine to me, especially if you look at it from the
perspective of EventDispatcher has events and DisplayObject extends
EventDispatcher and adds bubbling functionality. If you need bubbling,
extend the
>>I don't necessary see extending DisplayObject as a hack.
>>It's creative leveraging of AS3's native architecture.
Extending a display object to get the event bubbling of for a non-visual
class - if not a hack, then it's certainly kludgy.
Jason Merrill
Bank of America
GT&O and Risk L&LD So
I don't necessary see extending DisplayObject as a hack. It's creative
leveraging of AS3's native architecture. :)
Merrill, Jason wrote:
I think that's because only display objects can bubble events, I don't
think non-visual classes can bubble events (unless they extend a display
object lik
>>the problem with most explanations about event bubbling is
>>that it concentrates on the displaylist (understandable), i'd
>>like to see an example of custom events being bubbled.
I think that's because only display objects can bubble events, I don't
think non-visual classes can bubble events
the problem with most explanations about event bubbling is that it
concentrates on the displaylist (understandable), i'd like to see an example
of custom events being bubbled. Though Steven's probably right, playing with
it helps alot.
On Tue, Apr 1, 2008 at 12:49 PM, Allandt Bik-Elliott (Receptac
thanks Jiri
i've just got the design patterns book so i'll be digging into that
at some point in the near future
a
On 1 Apr 2008, at 10:40, Jiri Heitlager wrote:
I think the best way to learn about Event Bubbling is understanding
the Composite desing pattern. This is the pattern the Displ
I think the best way to learn about Event Bubbling is understanding the
Composite desing pattern. This is the pattern the DisplayList is
implementing and bubbling will make much more sense when you understand
the workings of the Composite Pattern. At least it did for me.
Jiri
Steven Sacks wro
ah yes - i couldn't get the mouseChildren to work before when i had
drawn in the movieclip but now i've separated the container movieclip
from the drawn-in shape, it' s working
thanks for your help guys
here's a copy of my code in case anyone else is interested:
CODE
// on xm
> Take off the true flag for bubbling and set mouseChildren = true.
This should solve your issue.
Er, I meant set mouseChildren = false.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/fla
You shouldn't be using capture phase until you've got a really good
handle on bubbling phase first.
You shouldn't have bubbling turned on for your button unless you are
planning on catching this event above this clip, as well.
Event Bubbling means that the TextField is dispatching a bubbling
okay i've tried everything i can find in the book re: this problem
and it doesn't seem to be having any affect
i've tried the mouseChildren option (commented out) and useCapture
tomfoolery (seems to be firing in the CAPTURING_PHASE as that's the
only one i can get any result from) and i've
i have the moock book but i couldn't get my head round the bubbling
phase and how it affected me - i need to look into it a bit more
i added mouseChildren=false but it made the entire event stop - even
on the objects that were working before, and i didn't even get the error
is this because
IMO, explaining Event Bubbling as the reason the TextField is the target
is complicating the immediate solution he needs, which is mouseChildren
= false.
Yes, it's Event Bubbling that's causing the target to be the TextField.
To understand Event Bubbling, read about it in the docs, or better
A perfect opportunity for someone more eloquent than I to explain event
bubbling.
On Mon, Mar 31, 2008 at 4:17 PM, Allandt Bik-Elliott (Receptacle) <
[EMAIL PROTECTED]> wrote:
> hi guys
>
> in actionscript 3, if i put a mouse event on a movieclip object
> containing a textfield, should the mouse
Try setting mouseChildren to false
Kenneth Kawamoto
http://www.materiaprima.co.uk/
Allandt Bik-Elliott (Receptacle) wrote:
hi guys
in actionscript 3, if i put a mouse event on a movieclip object
containing a textfield, should the mouse event be on the movieclip or
the textfield?
here's my
mc.mouseChildren = false;
or
event.currentTarget
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
hi guys
in actionscript 3, if i put a mouse event on a movieclip object
containing a textfield, should the mouse event be on the movieclip or
the textfield?
here's my code (comments added to see where the problem is occurring)
CODE
private function createPeriodBar(dateStart:int, dateEnd:i
hi guys
in actionscript 3, if i put a mouse event on a movieclip object
containing a textfield, should the mouse event be on the movieclip or
the textfield?
here's my code (comments added to see where the problem is occurring)
CODE
private function createPeriodBar(dateStart:int, dateEnd:i
23 matches
Mail list logo