AS3 scroller reference

Below you can find a quick reference for creating an AS3 scroller.
The example shows a simple (though spaghetti coded) way to create a fluid and functional AS3 scroller.

DOWNLOAD – AS3 scroller reference (20 KB)

This blog post is manly done for self-reference reasons. There are a lot of other Flash blogs and tutorial sites that deal with flash scrollers. This is just one solution that I happen to use quite frequently.

Chances are that if you create Flash content, you stumbled upon scrollers.
The problem is, while scrollers aren’t that hard to do, there are quite a few ways to create them, and the most obvious solution to do them, may not be the best way (I’m talking to you start- and stopDrag functions).
This is a best practice solution for creating scrollers. It relies on the MouseEvent.MOUSE_MOVE Event to render. The big advantage compared to a scroller using the Event.ENTER_FRAME event is that it renders a lot quicker since mouse events are able to render between frames.

– I updated the scroller reference to be a little more OOP friendly.

Click on the Image to open the example:
Scroller image