Be the first to write a review
Scripting Filters, part 1
If you’ve been reading the articles about the new features in Flash 8, you’ll know that Flash Professional 8 includes a range of filters that allow you to add special effects to objects on the Stage. In an earlier article, I showed you how to apply the following filters using the Flash interface:
- Bevel
- Blur
- DropShadow
- Glow
- Gradient Glow
- Gradient Bevel
You can also use ActionScript to work with these filters. In addition, you get to work with the extra filters listed below when you use ActionScript:
- Convolution
- ColorMatrix
- DisplacementMap
This article is part of the new interactive e-book; Out of my mind: Flash 8 Power
These are more advanced filters than the first group and involve complicated calculations. I’ll give you information about them but you might want to start scripting with the other filters in ActionScript first.
In this article, I’ll start by covering some background about how to work with filters in ActionScript. We’ll look at the Bevel and Blur filters and create a motion effect. In the next article, I’ll look at the other filters and we’ll create a small application that allows you to adjust a Drop Shadow filter dynamically.
You’ll need a copy of Flash Professional 8 to see the features covered in this article. You can download a trial copy from the Macromedia Web site. You should also install Flash Player 8. Note that the code samples within the article all use AS2.0.
You can download the files referred to in the tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file.
Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.
Sas Jacobs
Hello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.