Since the advent of Flash MX 2004 and JSFL, we have invested a great deal of time into JSFL extensions, panels, and other time-saving utilities for use on internal projects. Some of them have evolved into products, such as gProject and Panel Pack 1, but very few have been released for public use. A couple months ago we updated our products site with selected extensions, classes and components intended for sharing with the community, but between client work and foosball, they never were given the final QA pass to be released.
Over the next few weeks, we hope to finally publish the extensions to our site, and invite anyone interested to download, share, and comment on them. None of them are as fancy as gProject, but all of them have saved us a ton of time.
To kick off the extension exodus, we have made available one of our classes found in almost every AS2 project we have delivered. The GraphicButton class is a simple MovieClip extension that adds
- AS2 EventDispatcher, and events for click, over, down
- Frame-based state management: Add “up”, “over”, “down”, “disabled” frames to your timeline to easily create states, and the class does the rest.
To supplement the GraphicButton class is a JSFL script that turns any MovieClip into a GraphicButton. Simply select a MovieClip in your library and run the script, and the necessary layers, frames, and stop actions are added to the symbol’s timeline. The class is then bound to the GraphicButton class, and the class file copied relative to your project.