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.

Thermo User Personas

As you’ve probably heard already, Adobe demoed a new product called Thermo at the MAX Chicago Sneak Peeks session. In brief, Adobe describes it as a “RIA Design Tool”, which makes it easier to build fully functional Flex applications from design concepts. If you haven’t already, you should check out part 1, part 2, and part 3 of Aral Balkan’s video of Mark Ander’s demo of Thermo.

After watching the demo, and having a brief chat with Mark, one of the foremost questions I had was “Who will really use this tool?” Adobe is currently touting it as a designer tool, but I have enough experience in RIA development to know that I don’t want designers actually building applications.

As a way of answering this question for myself, and hopefully providing some useful feedback to Adobe, I decided to create user personas for the three types of people I see using Thermo. These are based purely on what I saw at the demo and a large dose of wild speculation. I’ve completely invented features (and in some case non-features) to highlight things I’d like to see, and challenges I think Thermo will face.

Continue reading →

It Never Rains, But It Pours

Wow, has it ever been a busy and stressful month!

Everyone at gskinner.com have been insanely busy leading up to MAX North America, working on a bunch of projects that were featured at the conference, including working hard to finish v6 of introNetworks, which was completely re-architected as a highly modular system in Flex 2, and which was deployed for the first time for MAX.

Beyond client work, I was putting in a ton of extra hours trying to finish off my AS3 workshop for Toronto, as well as putting together a talk for the onAIR bus tour, and two sessions for MAX. I was also trying to polish off our client-side AS3 spell checking engine (gskinner.com Spelling Plus Library) for release (more on this a little later this week).

On the home front, my wife and I started moving into our new house in the middle of September. Moving is bad enough, but the house also isn’t complete, so the builders are working around us, and we’re moving in around the builders.

As if this wasn’t enough, our four month old puppy Gir tumbled down a couple of steps and broke his front leg right on the growth plates less than a week before I was supposed to leave for Toronto. We wound up having to rush him 3 hours away for emergency surgery (naturally the local orthopedic vet surgeon had retired a couple weeks prior and his replacement didn’t start for another week), and are now charged with keeping a happy, energetic puppy from running, jumping, or playing for 10 weeks (7 weeks to go). Much love and respect to my wonderful wife for enduring 2 weeks with the little guy on her own in a half finished house while I was on the road!

So, all in all, a very hectic period in my life. If you’ve emailed me and haven’t gotten a response within the next couple days, please ping me again – I’m working to catch up, but want to be sure nothing falls through the cracks. Likewise, I’ll be catching up with a bunch of blog posts, and releasing some cool stuff (including the spelling engine) in the next few days.

ActionScript 3 Workshop details.

I’ve had a few people ask for more information on the ActionScript 3 workshop I’m running in Toronto at the end of September, and I thought it would be good to clarify the course goals.

This is not a beginner workshop. It is firmly targeted at developers who have a working knowledge of ActionScript 2, and want a fast way to get running with AS3. As such, I will not be covering any basic programming concepts, but instead will focus on differences between AS2 and AS3, and the new features of the language. It will be filled with tips, tricks, best-practices, and gotchas I’ve picked up while applying AS3 to both experimental and commercial projects.

It is lecture format, but with room for some open discussion and Q&A. Attendees will be given comprehensive course notes, and source code for all in-course examples.

Continue reading →

Minor Bug with Bitmap Smoothing in AS3

We recently encountered a problem where bitmap images that we created dynamically were not being properly smoothed when rotated and scaled. We couldn’t see any obvious reason for it – we were setting the container bitmap to smooth, tried every quality setting, but it still looked terrible.

The answer turned out to be super simple, if not immediately obvious. The Bitmap object in ActionScript 3 reverts its .smoothing property to false whenever you change it’s .bitmapData property. Because we were setting up our Bitmap objects in advance, then assigning BitmapData objects to them when they were created, it simply appeared as though smoothing just didn’t work in our project.

Continue reading →