Looking at the world of media: from music to RIA.

VivMedia Code Library: Version 0.02 Released

June 6th, 2008 Posted in ActionScript, Flash Player, Flex Development, Rich Internet Applications

rune_flash.gifIts been a busy few weeks for me (with work and personal projects) but I am happy to say that version 0.02 of the VivMedia library is now available. This update includes a fully automated Unit Test suite for all the code except the Local Connection Manager. Trying to automate the LCM is going to be coding feat in itself, so right now it is being tested the old fashioned way a.k.a. by hand. There are a few minor updates to the existing code such as streamlining how the HashTable clones the internal Array and some other minor updates to support automated testing. As usual the code is fully ASDoced and generated docs are available with the ZIP download.

The big change is this version is the addition of the new SelectionController and ISelectable interface. The SelectionController is a manager that allows you to group any number of items that implement the ISelectable interface and then treat them as a Radio Group or multi-selectable group. With the controller you assign items to groups and then you can use the controller to select and deselect the items.

A great example of this code is how I handle image highlighting in the Photoslider. Each of my image thumbnails implement ISelectable and then when a user clicks a thumb it calls the SelectionController.selectItem() and passes itself as an argument. The SelectionController then sets selected on all the thumbnails in the group, setting true for the passed in item and false for the rest. I plan on doing a full tutorial in the near future so keep an eye out for it. Enjoy!

  1. 1 Trackback(s)

  2. Jul 3, 2008: Vivisecting Media » Blog Archive » VivMedia Code: Selection Controller

You must be logged in to post a comment.