New Features in Flash 8 Professional, Part 1
Fun with Filters
Now that Flash 8 has formally been announced, there's no better way to kill time until the September release than by highlighting some of the new features the soon-to-be-Adobe Flash has in store. While Flash 8 packs numerous improvements for just about every type of Flash user, it's probably not a stretch to say that designers will be especially pleased. And since that's as good a place as any to start, today we'll be taking a gander at an addition that designers have been coveting for ages: filters.
Welcome to the family
It's only fitting for Flash to adopt some of the features found in programs like Photoshop and After Effects, since they'll all be roomies soon enough (if the Adobe takeover of Macromedia is allowed to go through, that is). Users of the aforementioned Adobe products take filters for granted, but Flash folk have traditionally had to jump through more than a few hoops in order to approximate even the most basic of filters. No longer. If you're a veteran Flash user, one of the first things you'll notice is the Filters tab built right in to the Properties panel (fig. 1). From this panel, you can apply any number of filters (fig. 2) to a movie clip. You're not limited to a single filter, either—you can stack multiple filters on top of each other (fig. 3), tweak and reorder to your heart's content, enable and disable filters without deleting, and even save presets for easy reuse later, all through the Filters panel.

Figure 1

Figure 2

Figure 3
Anatomy of a filter
So far, so good, but let's dig a little deeper into what you can actually do with Flash's filters. As you may have been able to glean from the earlier screenshots, filters are applied by selecting a movie clip, navigating to the Filters tab, and then adding the desired filter from the popup list. Simple enough. Once the filter is attached to the clip, there are some pretty self-explanatory options to play with. For example, in the case of the drop shadow filter, you've got blur, distance, color, angle, and strength (which stands in for opacity, for Photoshop and After Effects folks). Fig. 4 shows some basic settings as applied to my new friend, Mr. Monkey, whom Macromedia has been kind enough to include in the set of sample clips that come with Flash 8.

Figure 4
All of Flash's other filters have variations on these settings that are relevant to whatever effect they provide. Again, simple enough. There's also a quality setting, so if any filter starts to degrade the performance of your movie you have the option of dialing things down a bit. And depending on the filter, you'll get some nice compositing options as well. Again, using the drop shadow filter as an example, there are options for Knockout, Inner Shadow, and Hide Object. I'll let Fig. 5 speak for itself here:

Figure 5
From left to right, I've ticked the Knockout, Inner Shadow, and Hide Object options. Of course, these can also be combined to customize things even further. You get the idea here: there are a lot of different options that can be combined to make a lot of different effects, all applied live and in real time to any movie clip you've made. Pretty powerful stuff. But even more so once we add ActionScript into the mix.
Serious ActionScript geekery
Since everything I've talked about so far applies to what's possible through the Flash GUI, the more hardcore ActionScripters among us may, at this point, be asking just what in tarnation these newfangled filter thingamabobs mean to them. Fret not, ye mavens of curly braces and semicolons. Macromedia has seen to it that filters can be applied exclusively through ActionScript if desired, and has added a set of ActionScript 2 classes to handle dynamically assigned filters. Since I'm a "two birds, one stone" sort of guy, Fig. 6 aims to accomplish a couple of things. One, you can interactively see basic filters applied to our good friend Mr. Monkey in real time. Second, my little Mr. Monkey clip also exists to prove that I'm not yanking your chain and that yes, filters can be applied solely via ActionScript. The Flash 8 player is, of course, required to view the movie; get it here if you don't have it already (or, alternately, try this link if Macromedia has released the final version of the Flash 8 player since this piece was written).
You may notice that (depending on the speed of your machine, of course) once some of these filters are activated, the movie's frame rate can drop noticeably. Filters are great, and they are a very welcome addition, but Flash still is what it is. While Flash 8's performance enhancements are pretty darned good, the player is still rendering everything live and on-the-fly, so you may need to hang on to whatever speed tweaks and tricks you may have already cultivated over the years from previous Flash versions and apply them to filter use.
Now, while we're still (sort of) on the subject of ActionScript, it's worth noting that there are a few ActionScript-only options available in the overall filter class that should appeal to the hardest of hard-core ActionScripters out there. Filters such as the Color Matrix, Convolution, and Displacement Map filters will allow coders to "roll their own" filters and apply them to either bitmap or vector data, which opens up all kinds of advanced, pixel-level imaging that, until now, just wasn't possible in Flash. If you want to see more, there are already a bunch of Day 0 experiments floating around the Web, as the Beta testers can finally release what they've been playing with.
Tip o' the iceberg
I trust that you've got the ol' hamster furiously spinning the wheel in your head right about now, and that your neurons are ablaze with the possibilities. Some fantastic effects are possible right out of the box with even the most basic of filters, and the sky's the limit once you start adding ActionScript into the mix. Buttons that come into focus when you roll over them. Objects that glow and pulsate. Drop shadows that are combined with the transform tool to deliver true-to-life perspective. And on and on.
Time to pack up for now, but in the next installment we'll dive into another huge feature that is a perfect complement to filters: Flash 8's new blending modes. Until next time, kids!
Got Feedback? to send an email. I'll do my best to answer. Really.
