Jump to content

Gary Griswold

Mouse Click responsiveness, best practices

Recommended Posts

I notice that your examples of scrolling using ThrowProps pretty consistently listens for mouse events on mc.stage.add…. where mc is the container being scrolled.  And I notice that listening on the stage makes the listeners very responsive.  This works fine if the entire stage is being scrolled, but usually this is not the case.


The performance of the scroller seems to be very much affected by how quickly the listener receives the event.  Two possibilities of how to deal with this come to mind.  One approach would be to find the display object that is the correct bounds and closest to the stage.  In some cases this might be the scroller itself. In my case the parent of the scroller is always the correct size.  The other option would be to listen on the stage, and check the target to see if the scroller is an ancestor.


Do you recommend one approach over another?  Or, do you have another to suggest?  I apologize if this question is too general, and understand if you would prefer to pass on it. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.