SPL Tricks: Powerful Multi-Purpose Text Highlighter

One of the things I put a lot of work into for Spelling Plus Library was architecting it in a very modular, extendable fashion. The main reason for this was to allow developers to use it in the way that makes most sense for their projects. For example, Buzzword only uses the SpellingDictionary class, which handles all of the spell checking and spelling suggestion logic, and the WordListLoader, but manages the user interface themselves.

A secondary benefit is that many of the classes are very useful on their own. The best example of this is the TextHighlighter class that forms the core of the SPL SpellingHighlighter. It is a very powerful class for finding and highlighting words in a text field in real time.

It includes a ton of features, including support for manual selections, multi-line highlights, smart targeting, autoupdating on change and scroll, interactive highlights, and more. It will be gaining even more functionality in the upcoming 1.1 release of SPL.

Continue reading →

Squeeze Effect Source Code

One of the limiting factors for how much code I release has always been the need to clean up and refactor the code before I make it public. After thinking about it a bit, I decided in the interest of sharing more with the community I would start releasing some of my simpler “proof of concept” type experiments without polishing them first, starting with this one.

A little over a year ago, I put together a simple OSX-esque squeeze effect to transition in dialogs in one of our projects. It never saw the light of day, but I stumbled on the proof of concept yesterday and thought I should share it. It uses DisplacementMapFilter and a simple tween.

Here’s what it looks like:

Continue reading →

Replace actions on labeled frames in AS3

I recently built a simple class called FrameScriptManager that allows you to set actions on any frame referenced by number or label at runtime from within a bound class. This allows developers to associate code with specific points in timeline animations or transitions, without having to modify the FLA. Because you can reference frames by label, the developer also does not have to worry about designers changing the length of the animation, as long as the label remains in the appropriate location.

This class relies on the undocumented addFrameScript method in AS3, which should be fine as Flash CS3 uses it to insert frame actions, but you should be aware that there is a dependency on an undocumented method prior to using it.

I also built an experimental version of the class that adds additional features, like reverting the frame script and getting or calling the original script. This would have been handy to allow developers to add their own frame actions, but still call the original timeline actions. Unfortunately, because the frameN methods (autogenerated by FlashCS3 for frame actions) are placed in the internal space, these features can only be used on movieclips in the same package as the FrameScriptManager class. As such, I wouldn’t recommend using this version, but I have included it for reference.

Continue reading →

GPSD’07 Results are in!

Halloween has come and gone again, so it’s time to tally the votes and declare a winner. For the second time in 4 years, Wes and Kyle emerged as winners, with the “Girl Next Door” winning with 89 votes (35%).

“The interns” Nick and Eddie pulled on your 80’s nostalgia heart strings, bringing the Deceptikin in to 2nd place with 65 votes (25%). The Teenage Mutant Ninja Pumpkin by Ryan and Lanny, try as it might, could not overtake the transformers, and came in to a close 3rd place with 61 votes (24%). In last place, Michael and Sebastian’s Mac o’Lantern failed to invoke the fanboy support it expected with 39 votes (15%). It probably did better than a Windows pumpkin would have done in any case.

So that’s it. Back to labor and toil for the gskinner boys. To wrap up this year’s festivities, here is the aftermath of the desecrated pumpkins. This year we left them outside to avoid the pumpkin smell and fruit flies, so assumedly they held up longer than last year.

Thanks to all who voted!

The Great Pumpkin Showdown ’07

One of our favorite non-flash events here at gskinner.com is the pumpkin carving contest. This year was no exception, and we split into 4 teams (in order of seniority), and converted ordinary squash into ordinary squash with holes and a candle, which is just as good an excuse as any to drink beer and eat copious amounts of sugar at 2:45 on a Wednesday.

Unfortunately, even though our company grew. the number of entries is the same as last year. Grant and his wife are galavanting around Europe, so not only did they miss out on the festivities, but we missed out on Bobi’s yummy halloween goodies (and their company of course).

Continue reading →