Icon

New Features in Flash 8 Professional, Part 2

Fruity (Yet Unassuming) Blends

Fresh off of our riveting foray into the exciting world of Flash 8's filters, it's now time to turn our collective attention to another new feature: blends. That's right—they're not just for Photoshop and After Effects anymore. As you'd probably expect, Flash's new blend modes open up some powerful live compositing options, but there just may be a surprise or two hidden in all the blend-y goodness as well. So let's dive right in, shall we?

More fun for designers

As I mentioned in the last installment, Flash 8 is chock full of new stuff for the myriad user types out there, but designers have cause to be especially happy with the new release. I'm talking Snoopy-dance happy. Blend modes are likely old hat for the Photoshop and After Effects veterans out there, but as with filters, it took some serious freaky mojo in Flash to even come close to approximating the types of effects true blend modes offer. But let's take a step back for a moment. I suppose that there are some out there that have no idea what blend modes are, much less why they should care, so I offer this definition (courtesy of Flash 8 Professional's Help panel, which is one of the clearest explanations of blend modes I've seen):

Blend modes let you create composite images. Compositing is the process of varying the transparency or color interaction of two or more overlapping objects. Blending lets you create unique effects by blending the colors in overlapping movie clips.

Simple enough, right? Of course, there's some serious mathematical voodoo and scientific jargon behind how blend modes work, but consider the gist gotten. The point is, put two clips over top of one another, adjust the color and opacity of each to taste, apply a blend mode, and you're in business.

Blends gone wild

If you're as old and grizzled as I am, you may remember the joyous occasion that was the release of Photoshop 3.0 in the autumn of 1994 (when I was but a young buck fresh out of college). I remember tossing the tutorial CD ROM into my PowerMac 7100/66 AV and watching, mouth agape, as Russell Brown (AKA "the wacky professor of Adobe Systems") demonstrated Photoshop's fantastic new layer palette and the selection of blend modes that adorned the top of said palette. Fast forward eleven years (as well as several pounds and more than a few gray hairs, at least in my case), pop open Flash 8's Blend menu, and feel the retro love (fig. 1).

Fig. 1
Fig. 1: On the left, Photoshop 3's blend modes, circa 1994. On the right, Flash 8's implementation, circa 2005.

Don't get me wrong—I'm not ranking on Flash's version of blend modes. Far from it—I got a pleasant whiff of deja vu when I first saw it and thought I'd share. Of course, current users of Photoshop and After Effects (as well as the forthcoming Fireworks 8) are used to a few more options than this, but I certainly am glad Flash is finally joining the party here. Anyway, I digress. Blend modes in Flash are applied in pretty much the same way as filters: select a movie clip, add a blend, and viola. Blends apparently aren't special enough to get a dedicated panel the way filters do; instead, blend modes are a new option in the good ol' Properties panel (fig. 2). Click, pick, and you're set.

Fig. 2
Fig. 2

Of course, the blend menu is conveniently located near the stalwart color menu, and for good reason. Depending on the blend mode, you'll want to use the color menu to set a clip's tint, alpha, brightness, or whatever else you like to achieve to desired effect. And despite my lighthearted comparison of Photoshop '94 to Flash '05, the thought of combining blends with the options of the color menu, sprinkling in some animation, and maybe adding a dash of ActionScript would have most assuredly given the '94 version of me some sort of aneurysm.

So let's take a quick trip around the horn here. Rather than tell you what each blend mode does in the parlance of the "serious mathematical voodoo" I alluded to earlier (which I'm horribly underqualified to even pretend to explain anyway, since my scientific observation skills begin and end at "oooh...shiny"), why not show you? Fig. 3 brings back our dear friend Mr. Monkey from last time, throws him rather unceremoniously against various tinted and semi-transparent blobs (done via the color menu, naturally), and offers you, the treasured reader, an opportunity to try out the various blend modes via the picklist. Of course, you'll need the Flash 8 player to view Mr. Monkey (available from either the Beta site or the main Flash Player site, depending on whether the Flash 8 Player has entered final release since this writing). Have at it!

Figure 3

Now, before you break out the collective "not so fast, buddy, I was looking really hard at Fig. 1, and you forgot about Layer, Alpha, and Erase modes," let me counter by saying, "patience, young Skywalker, we'll get there." First, I hope that it's obvious from the above clip that you can apply blend modes at runtime solely through ActionScript. But if it's not, let me take this opportunity to say that you can apply blend modes at runtime solely through ActionScript. With that out of the way, a word about the blend modes themselves. Now, for my money, the real interesting stuff starts to happen with the very last selection—invert. Notice how Mr. Monkey becomes an animated mask, inverting the colors that intersect his boundaries. And therein lies the faintest whiff of the (potentially) surprising feature of blend modes.

The (potentially) surprising feature of blend modes

The somewhat hidden power that's so nice I mentioned it twice (and in consecutive sentences, no less—there's gotta be some sort of bad writing award for that) is that blend modes can also be used as masks. And not just any masks, like the built-in useful-but-kinda-sorta-ultimately-inflexible-and-maybe-even-a-bit-lame-oh-no-he-di'int masks Flash has had for eons. We're talking masks with soft edges, which is more or less the Holy Grail of masks (at least as far as Flash is concerned). In a nutshell, the Layer, Alpha, and Erase blend modes can work together to enable soft masking within movie clips. And as I realize how little sense it makes to keep attempting to describe this process abstractly, let's do a quick 'n dirty experiment to show what I'm talking about here.

Say I want to take an image of my second favorite animal, the echidna (not that you asked, but my absolute favorite is the venerable llama), and place a soft mask over his head to let a gradient background and a bit o' text show through. In previous versions of Flash, I would have had to bang out a soft-edged alpha channel for the echidna in Photoshop, export the precomposed image as a transparent PNG file, and then import that image into Flash to achieve the same effect. Not so in Flash 8. Here are the steps needed to create a soft mask using blend modes:

  1. Take the unaltered photo and place it inside of a new movie clip.
  2. Create a mask and place it on another layer inside the same movie clip the photo is in.
  3. Apply a blur filter to the mask.
  4. Set the blend mode of the mask to Erase.
  5. Up at the root level of the movie, set the blend mode of the container clip to Layer.

Fig. 4 is my attempt to visually show these steps (clockwise from top left), with the last panel showing the result:

Fig. 4
Fig. 4

The upshot of all this is that Layer mode exists to tell Flash to perform operations inside of the clip the mode is applied to, and Alpha mode (applied to an enclosed clip) tells Flash to use the transparent (or semi-transparent, as the case may be) areas of that clip to reveal what's underneath it. Erase mode is simply the inverse of Alpha mode. Got all that? Well, for further reinforcement, Fig. 5 shows how the Alpha and Erase modes work interactively on my images:

Figure 5

I trust you get the idea by now—blend modes have the somewhat hidden ability to (finally) create truly transparent and semi-transparent masks. However, blend modes aren't the only way to do this in Flash 8. But, alas, that particular nugget will have to wait for a later installment. Yes, I am a tease.

Wrap it up

Now that I've managed to meander my way towards some sort of coherent conclusion, my hope is that you've gotten more than a little glimpse into the power of Flash 8 Professional's blend modes. Next time we'll delve into some of the new video features Macromedia has been so kind as to add to Flash 8, so I urge you to try and find something to do with yourselves until then. Buh-bye for now!

^ Top of Page

Got Feedback? to send an email. I'll do my best to answer. Really.