Extension Melee (Part 1)

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.

I. GraphicButton

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

  1. AS2 EventDispatcher, and events for click, over, down
  2. Frame-based state management: Add “up”, “over”, “down”, “disabled” frames to your timeline to easily create states, and the class does the rest.

Download the GraphicButton class

II. CreateGraphicButton

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.

Download the CreateGraphicButton MXP

Lanny McNie

As the dev mgr, Lanny oversees the technical day-to-day details of production and makes sure things get out the door.



  1. Cool extension!!!

  2. Hey Grant,

    Had something similar in my class lib for years, but really love the idea of having a command to convert the movieclip assets!!

    Thanks for sharing 🙂

  3. Wow, great. Haven’t tried out yet, but well downloaded. Sounds great! Could change the way I work out projects. Thanks!

  4. So. i started using this. It’s good, no question! I was never aware of this kind of functionality inside the Flash IDE so far.

    However, I found it very unhandy that the event is dispatched before the gotoAndStop() command, because, in my case developing a skin system, you may want to set for example color on bg, border or icon inside the button, which is only possible if the event is dispatched AFTER the clip has been sent to the state-frame.

    Was there a specific reason why you dispatched before gotoAndStop() ?



  5. Thanks for the class, it’s exactly what I’m looking for.

    However, could you give me an example of actual use in actionscript? I’ve been fighting with it for hours as I’m new to the OOP world.

    I can attach the class to a movie via linkage, and all of the mouse states (down, up, over, etc.) work perfectly.

    What I can’t seem to figure out is how to control the state via actionscript, nor can I create new graphicButton movies dynamically.

    Thanks for any help,


Comments are closed.