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 →

Spell Check Engine for AS3, Flash, Flex, AIR

Today I am happy to announce that the gskinner.com Spelling Plus Library (SPL) is available for purchase. It is a client-side, real-time (check spelling as you type) spell checking and spelling suggestions engine for ActionScript 3, including Flash CS3, Flex 2 / 3, and Adobe AIR. It was architected to be robust and performant, while also being extremely customizable and simple to use.

If you’ve seen any recent demos of Buzzword, you’ve already seen SPL in action. Virtual Ubiquity implemented Spelling Plus Library in their awesome word processing application, and has provided invaluable feedback that we have used to enhance the API.

In Flash CS3, you can set up spell checking on text fields or components without a single line of code. Just drag and drop components on stage. In Flex, you can use a few simple MXML tags to set everything up. Of course, if you want to get down and dirty, you can use the library’s robust and well documented API to control virtually every aspect of spell checking.

A few of SPL’s more notable features:

  • Checks spelling in any text field, as you type, with no server dependency

  • Context menus for spelling suggestions

  • Under 12kb for the full library and just 4kb for the core spelling logic. The full US English word list file (over 150 000 words) is only 250kb.

  • Background wordlist loading and polite parsing means you don’t have to halt your application while the dictionary initializes.

  • Support for accented characters, case sensitivity.

  • Can check over 35,000 words per second

  • Very simple mechanism for customizing underline styles and colors

  • Full support for HTML styled text, works with rich text editors

  • Custom user word lists

  • Comes with example files, US and UK word lists, a quick start guide, a specifications document, and full API documentation in ASDoc format

If you’d like to learn more about SPL’s features, view some demos, or buy a license, check out the gskinner.com Spelling Plus Library product page.