If (verticalScrollBar &&  verticalScrollBar.contains(event.target))

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Thursday, May 08, 2008 10:23 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Container ScrollBar Click vs Container Click

 

Is there an effective way to determine a click on a scroll bar versus a 
click on the container?

<mx:Canvas height="200" width="200" verticalScrollPolicy="auto" 
click="containerClick()"/>

I only want the click event to fire for the container if the click was 
NOT on the scrollBar, if the scrollBar exists.

I know that I can check the container mouseX value and generally tell 
whether or not the scrollBar was clicked (assuming the contents of the 
container require a scrollBar), but that isn't fool proof, depending on 
whether or not there is a scrollBar. The FlashPlayer certainly can tell 
the difference, since it knows when to scroll and when not to scroll, 
based on where the user clicks. Seems the container class controls 
should have a couple more event triggers:

verticalScrollClick and horizontalScrollClick

 

Reply via email to