AS3 – Scrollbar using MOUSE_MOVE instead of startDrag()

There is a million tutorials on how to create a scrollbar in AS3 but I noticed a lot of them use the startDrag function. While it works, when your mouse leaves the swf it will stop tracking the mouse movement and act a little strange when you return. Here is a quick snippet on how to use the MOUSE_MOVE mouse event instead which will track your mouse outside of the swf file (which is how a scrollbar should behave).

, , ,

Powered by WordPress. Designed by Woo Themes