Jump to content

Gary Griswold

Vertical ThrowProps Scroll combined with Horizontal Page Slider

Recommended Posts

The ThrowPropsPlugin API page contained an example of using it for scrolling a page vertically, and the throw props web page contained an example for doing horizontal panel transitions that animate entire panel movements right and left.  Both of these work extremely well.  But when I combine them, I run into problems that both of them are acting on mouse up and mouse down events, which means neither is working as intended.   Add some interactive objects to the scrolling page, and it only gets more complicated.


I think the solution is to write a singleton class that interprets mouse down, mouse move and mouse up events on the stage and infers user intent so that is can dispatch an event to either the scroller, or the panel slider, or the interactive object in the scroller viewport.  My past experience with mouse events is limited to listening for clicks.  So, if there is any example code that would point me in the right direction, I would be very happy to know about it.

Link to comment
Share on other sites

I think you're right - maybe listen for mouse down/up/move events, and wait until the user drags at least 3 pixels (or some threshold), and distinguish if the direction is horizontal or vertical, and then act accordingly.

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.