Sunday, February 13, 2011

Best method to scroll a ScrollPane by mouse hover location in actionscript?

When mouse nears top edge of scrollpane, it scrolls up until it reaches the top only interrupted if the mouse leaves the top edge area.

Same for bottom edge.

  • You need to make a symbol that you can write AS code on that is invisible (set alpha to 0) and lies in the area you want to have the desired behavior to occur.

    make sure its a button symbol

    on the mouseover for your hidden symbol you tell your pane to scroll. on the mouseout for your hidden symbol you tell your pane to stop scrolling.

    Keep your hidden symbols on a higher layer than your scroll pane.

    From mugafuga

0 comments:

Post a Comment