Paginator AS3
May 17th, 2009I’ve got a couple projects currently in production that require the pagination of data which has lead to PaginatorAS3. It’s a small controller/model for paginating data contained in a Array. Pagination seems to pop-up in a lot of ActionScript projects in a variety of forms, so I decided to formalize it into a flexible object. PaginatorAS3 contains no views, but takes care of all the data management in a clean simple implementation.
To create a new paginator you do the following:
Then to retrieve the data set for a page you can do the following:
It supports 3 page scrolling types, NONE (see all pages), SLIDING (current page in the middle), and JUMPING (jumps by groups of pages), additionally you can control the number of pages to appear at one time. (NONE ignores this)
Below is a simple demo using the sliding scroll style.
Download the source and demo here. (Demo code included)
View the docs here
This is a BETA release, so if you try it feel free to offer any feedback.
Absolutely awesome!
dude this looks amazing but the source file is MISSING! please put it up so I can use this awesome stuff!!
THANKS
Opps, I’ve updated it since this post, I fixed the link here, you can also get it on the code page: http://blog.tyleregeto.com/?page_id=58
Hope it’s useful.