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- 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.

Comments (6)
Cool extension!!!
Posted by: Aristides at March 13, 2007 12:30 PMURL:
Lovely! Thanks guys!
Posted by: Kevin Sweeney at March 13, 2007 06:46 PMURL: http://www.kevinsweeneydesign.com
Hey Grant,
Posted by: Keith at March 14, 2007 03:48 AMHad 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 :-)
URL: http://ktec.blogspot.com
Wow, great. Haven't tried out yet, but well downloaded. Sounds great! Could change the way I work out projects. Thanks!
Posted by: Jovi at April 14, 2007 06:13 PMURL: http://www.loopmode.de
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() ?
Greetings
Posted by: Jovi at April 16, 2007 07:16 AMJovi
URL: http://www.loopmode.de
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,
Posted by: Russ at April 22, 2008 05:06 PMRuss
URL: