Paginator AS3 version 0.6.0

June 21st, 2009

After working more with Paginator AS3 on client projects I’ve added a couple of new features to the pagination object and fixed a few minor bugs. The following features have been implemented in the latest update, version 0.6.0.

  • Added lastPage property. Will return the page the pagination object was on before the current one, or zero if the page has not changed yet. This is useful for detecting the direction movement.
  • Added getItemsOnPage(page:int):Array method. Allows access to the information on any page.

You can grab the latest version on the Code page.

Version 0.7.0 will feature a simple pagination control view, with the main goal of making prototyping easier.

ActionScript 3 Tooltip

May 29th, 2009

I’ll be releasing more tools and helpers in the near future as I formalize / clean-up my existing code libraries. In addition to the ActionScript pagination system released earlier this month, PaginatorAS3, today I’m release a small Tooltip system.

Hover over a icon to see it’s tooltip:

Get Adobe Flash player


Icons created by Mark James, www.famfamfam.com/lab/icons/silk

This small library makes adding tooltips to ActionScript based projects really easy. Some key features are:

  • Instance based, not Singleton (as it is in Flex) which allows for multiple instances to exist in a single application.
  • Objects who have tooltips do not need to know about the display controller
  • Easily add a tool tip to any custom DisplayObject

To add tooltips to an application you need to create an instance of ToolTipController. ToolTipController has two parameters, the first is the root DisplayObjectContainer that you want to find tooltips in, (It will automatically find any tooltip’s in it’s display list), and the second is an instance of the IToolTip interface which will handle the tool tip target.

var toolTip = new ToolTip();
new ToolTipController(stage, toolTip);

The ToolTipController will look for any objects that implement the IToolTipTarget interface.

You can download it here (with demo)
and view the docs here.

This is a BETA release, so feel free to offer any feedback.

Paginator AS3

May 17th, 2009

I’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:

paginator = new Paginator(myArray);

Then to retrieve the data set for a page you can do the following:

paginator.getCurrentItems();

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.

This site uses icons created by Mark James, www.famfamfam.com/lab/icons/silk