I basically posted the same question on 2/14/06 (“Mouse Event Filtering”) and nobody was able to provide a solution.

 

I found this link that explained the grisly situation with Flash event capturing (http://senocular.com/flash/tutorials/buttoncapturing/). I had to move on for a while working on a rich text editor that worked around Flash’s also grisly text selection timing problems (which you have to deal with if you want to implement something like a text styles toolbar, and you want to refresh the selected text, but need to do it after Flash finishes its updating several frames later).

 

Anyway, I’m working on a slight variation of the delegation method discussed in the article, but I’m not happy that I have to do something that the framework should be doing for me, which is checking to see if a mouse event occurs within the bounds of the topmost component of a container’s children, and invoking the mouse handler there.

 

If I come up with a reliable and generic enough solution, I’ll be happy to post it … but it would be nice if someone with experience/knowledge in this area could at least indicate if this is a problem that has been addressed with Flex 2.0….

 

-Tony

 

 

tony pujals| senior engineer | Yahoo! SiteBuilder Express

p. 408.349.6284 | e. tonyp * yahoo-inc . com | y!id tonypujals

 

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani
Sent: Monday, March 13, 2006 8:09 AM
To: [email protected]
Subject: Re: [flexcoders] Re: Capture events a la the underlying transparent window from PopUpManager

 

On 3/13/06, dopenhagen <[EMAIL PROTECTED]> wrote:

> Sorry, no - its actually the opposite I am trying to achieve. Where the
> underlying layers do not recieve the event.
>
> Part of my MXML:
>
> <mx:Panel
[snip]

>         mouseDown="this.shoppingcartViewHelper.onMouseDown(event)"
[snip]

> The questions is how do I get this panel to capture all mouse-events
> and NOT bubble them on to the lower layers?

Sorry, I really don't remember how this worked in Flex 1.5, but can
you try setting event.bubbles to false (in the mouseDown handler)?

Manish



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to