Lanny McNie

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

@astrostyle

Extension Melee (Part 2)

To continue the extension goodness (see part 1), here is another handy extension that’s sure to boost your productivity.

Find In Library

One of the most common workflows when working in FLAs is the need to find the library item for a symbol on the stage. Simply select a symbol on stage, and run the Find in Library command, and the appropriate library symbol is selected. This command is most useful when bound to a keyboard shortcut, such as CTRL-E.

Download the FindInLibrary Extension

To add an extra bit of functionality, install the OpenBoundClasses extension as well: if a class is bound to the symbol, it will automatically open when you run the FindInLibrary command.

You must have your library open for this extension to work. Additionally, Flash will not scroll the library to the selected symbol.

If you’re looking for an opposite workflow, finding stage instances with a specific symbol or linkage, I recommend checking out gSearch, part of our first Panel Pack, which includes a powerful Timeline search tool.

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

Flash opens the wrong panel: An automated fix

Since we released gProject, we receive about 2 emails each month reporting that opening the panel causes a different panel to open. This can cause duplicate panels, or panels that NEVER open. This is a flash issue, which has been widely reported. The solution is simple, although a little hard to explain, especially to people who have no idea where the flash configuration folder is.

Internally, we use a nifty little extension that automatically fixes the issue for you, for whatever version of flash you run it in.

For anyone who doesn’t know, flash indexes the panels in an XML file located in a file called panelset.xml in your flash configuration directory. Adding panels sometimes messes up those indices, but deleting the file will fix the issue. It will also remove your saved workspaces, but I think its worth it.

Our JSFL file toasts the xml file, and automatically restarts flash. The extension is by no means complex or ingenious. It is handy however. I hope someone out there finds this useful. If not, at least I can point people to this blog entry in the future.

Please note that this may delete your saved workspaces!

Download the file here

Refreshing Panels in Flash 8

Here at gskinner.com, we do a lot of panel development. For speedier development, we set the publish settings to spit the swf directly into the “Flash MX 2004/en/Configuration/WindowSWF/”directory. This way, once the panel was published once, you didn’t need to move any files, or even leave the IDE — you could simply close and open the panel.

One of the biggest panel development gotchas in Flash MX 2004, was that in order to refresh a panel, you needed to click the “close” button, and not use the right-click/close panel method. Using the latter would keep the panel open in memory, and not reflect changes when it opened.

When Flash 8 dropped, we were excited about the smarter custom swf panels, which detect changes in the swf, and refreshed only when changes were made. This means that no matter how you close the swf, it will not reload unless changes are made. That in itself is great, but a bug in Flash 8 refreshes only the graphics in updated swfs, and not the external classes. This made panel development in Flash 8 impossible. Until today, we had been doing most panel work in MX04, and in the cases where we need to use Flash 8, multiple restarts were necessary.

The solution?

Dock/undock the panel.

We found this totally by accident, but it works! This is the only way to completely refresh the panel, code and all in Flash 8.

gProject for Flash 8

I know its a little later than promised, but an update to the gProject panel is now available that plays nice with Flash 8 (But still works in MX04 7.2). The new version also fixes a few bugs, and takes advantage of some of the new Flash 8 enhancements (such as setIdleTimout).

As usual, gProject can still be purchased here, and you can find more information on the gProject page, as well as the online documentation, which has been updated. For those who purchased gProject, you should receive an updated version via the email address you provided today. If you haven’t received anything, please feel free to send an email to gskinner (at) kagi (dot) com.

Important Notice

gProject does NOT work with projects and files stored on a network drive. This has to do with a limitation in the JSAPI, and as such may not be resolved in future versions.