Archive for May, 2006

New Vocabulary

Wednesday, May 31st, 2006

You know the interesting phenomenon, when you learn a new vocabulary word — “ubiquitous,” say — and it suddenly starts appearing everywhere?  You hear it on the radio, read it in the paper, experience it in conversations around the water cooler.  For me, a similar thing is happening right now, but not with words:  with opportunity.

Last Wednesday, I put in my notice at work — on very good terms, no bridges burned.  I’m going full time freelance, which is exciting and somewhat nerve-wracking all at once.  Ultimately, I’m more confident than I am anything else.  My wife supports me in this decision, I’ve hedged my bets, and so far things seem to be falling nicely into place.  Keep reading »

Debugging ActionScript 2.0 Code:  Lifting the Blindfold

Tuesday, May 30th, 2006
ActionScript 2.0 Flash

There are innumerable things to enjoy in MGM’s The Wizard of Oz, not the least of which is a valuable lesson learned:  “If I ever go looking for my heart’s desire again, I won’t look any further than my own back yard,” as spoken by Dorothy near the conclusion.  In the Flash world — in fact, in development or programming of any kind — this can be applied to the concept of reading the documentation, as illustrated in my recent Community MX article, “Tackling the ActionScript 2.0 Language Reference.”

But there’s more to it than that.  Next to studying the docs, you’ll need another indispensable skill:  debugging.  This is especially true when dealing with ActionScript.

I’m pleased to announce that Adobe has accepted an article I wrote on this topic, recently published in their Developer Center.

I’d like to thank Chris Georgenes, Stefan Gruenwedel, Jen deHaan, and Michael Koch for providing valuable input, feedback, and encouragement along the way.  Special thanks to Branden Hall for giving me kind permission to put an ActionScript 2.0 gloss on one of his custom functions, originally published in his and Samuel Wan’s Object-Oriented Programming with ActionScript.

Quickly Straighten the Horizon

Tuesday, May 30th, 2006
Quick Tips

This is a Photoshop tip.  Sometimes the horizon in an otherwise perfect image is a bit off kilter — by two or three degrees, maybe — just noticeable enough to be annoying.  When I encountered something like this in the past, I used to do the following:  drag a guide down to where the middle point of the horizon should be; enter Free Transform mode; zoom in, in order to see what I’m doing; then rotate by hand.  Often, I would have to drag the center point in order to facilitate this rotation.  It was always a bit hit or miss.  Well, I recently discovered a much quicker approach.  Keep reading »

Frohe Geburtstag, Meridian!

Friday, May 26th, 2006

Ach, du bist ja zwei Jahre alt! Papi liebt dich, Bohne! Mami und Papi lieben dich sehr. :)

Meridian turned two today. She is a treasure in Dawn’s and my life; it’s a simple as that.


How to Pause Sound and Resume Where it Left Off

Thursday, May 25th, 2006
ActionScript 2.0 Flash

In recent entries, we examined the Sound constructor and toggling sound globally.  Let’s continue in this vein and take a closer look at how to pause and resume audio.  The Sound class provides two handy methods for this:  Sound.stop() and Sound.start().  Thanks to these, we can wire up a button to pause a Sound instance, and another to restart it, without much effort at all …

var snd:Sound = new Sound();

btnHalt.onRelease = function():Void {
btnResume.onRelease = function():Void {

… but this doesn’t resume the sound:  this starts it again from the beginning.  How can we start the audio from where it left off?  Keep reading »

Drill Down Quickly to Deeply Nested Folders

Wednesday, May 24th, 2006
Quick Tips

It doesn’t matter what application you’re in; sooner or later, you’ll run into a Save As situation where your file needs to be put into a deeply nested folder.  This may be different for Mac compadres, but in Windows, it usually starts like this:  click My Documents, click Multimedia, click Clients, click ABC Company, click 2006, click … you get the idea — until you find the folder you’re after.  Then it’s off to the next file.  Select Save As, and whoa!  “Didn’t I just … why doesn’t this remember where I saved my last file?”  So you start the drill down again.  It’s pretty tedious.

The best part is, as I write this blog entry, I can’t seem to reproduce the issue.  It’s like visiting the doctor to make your cold go away — but I know this has happened to me hundreds of times.  Here’s a quick workaround.  Keep reading »

Tackling the ActionScript 2.0 Language Reference

Monday, May 22nd, 2006
ActionScript 2.0 Flash

I happily spend a lot of time in the Flash and ActionScript forums at, glad to help when I can.  In many cases, questions arise whose answers are best served (and quickest served!) by the documentation that ships with Flash — especially when it comes to ActionScript.  Interestingly, I’ve noticed over the years that many people seem timid toward the ActionScript 2.0 Language Reference.  They want to use it, but don’t know where to begin.  I’d like to do my part to remedy that.

I’m pleased to announce that Community MX has accepted my article on this topic as part of their free content offerings.

Hope this helps.  :)

Jump to Last Position in MS Word

Monday, May 22nd, 2006
Quick Tips

I’m reviewing a dozen-page document at work for a trade journal.  I started on Friday and realized I’d have to finish this morning (Monday).  Did I note what page I was on?  Nope.  But was I able to find my place again?  Yup.  Keep reading »

Understanding the Sound Constructor (AS2)

Thursday, May 18th, 2006
ActionScript 2.0

Generally speaking, once you “get” how objects work in ActionScript, you’re on good footing.  Even if you’ve never used, for example, the Date class, you’ll be able to see from a few ActionScript Language Reference examples that it’s not a static class (such as Math) — which means you must instantiate an object first, then work with the instance.  Once you’ve decided on an instance name, you’re good to go:  just invoke the desired property, method, or event on the instance.  That said, a few choice ActionScript classes are a bit different; the Sound class is one of them.

Connected at the clip

What do I mean by different?  Well, Sound instances are effectively Siamese twins.  A Sound object is always associated with a particular MovieClip instance, and it’s this relationship that can cause confusion until you understand what’s going on.  Let’s take a look at an example.  Keep reading »

How to Toggle Sound Globally (AS2)

Friday, May 12th, 2006
ActionScript 2.0 Flash

Flash is a great medium for presenting sound, whether narration, music, or basic UI clicks and whirs.  That said, it’s a good idea to provide a way for people to toggle sound off, if they prefer silence.  You may have heard or read about the global stopAllSounds() function.  It’s good in a pinch, because it does exactly what its name implies:  any sound currently playing is abruptly shut off.  Of course, additional audio in subsequent frames continues to be heard.  If other buttons are wired to produce sound, they continue to do so when clicked.  stopAllSounds() isn’t a toggle, it’s just an immediate silencer.

This topic comes up a lot in the forums, actually.  You may have heard about using the Sound class to trigger sounds with ActionScript.  It’s possible in this way to check against a single, globally accessible Boolean variable before invoking Sound.start().  Naturally, this means that every last sound in your SWF would have to be programmed, which may be a daunting prospect.  Personally, I’m a fan of the Sound class.  It’s great for games and ActionScript-based presentations, but there’s certainly something to be said for the drag-and-drop utility of placing sound assets by hand in a timeline.  So … is there an easy way to toggle these sounds (any sounds) off — and then on again?  You betcha.  Keep reading »