
Macromedia MAX 2005 - Anaheim, CA What’s New In Flash 8
80
This ActionScript code populates the combo box with each type of blending mode, so the
user can view each effect on the dynamically loaded image. A listener object is created,
which is used with a MovieClipLoader instance. The listener object defines a single event
listener, onLoadInit, which is invoked when the image is completely downloaded and is
initialized by Flash.
The event listener creates a new movie clip named blendModeType_mc, and uses the
Drawing API to draw a rectangular shape over the left half of the image. The currently
selected blending mode for the ComboBox instance is then applied to the
blendModeType_mc movie clip.
The rest of the code sets up the MovieClipLoader instance, which is responsible for loading
the specified image into a movie clip on the Stage. Finally, a listener is defined for the
blendMode_cb ComboBox instance, which applies the selected blending mode whenever a
new item is selected from the ComboBox instance.
4. Select Control > Test Movie to test the document.
Working with Filters
About Filters
Filters let you add interesting visual effects to text, buttons, and movie clips and are most often
associated with applying drop shadows, blurs, glows, and bevels to graphic elements. A feature
unique to Flash is that you can animate the filters you apply using motion tweens. For example, if
you create a ball (or sphere) with a drop shadow, you can simulate the look of the light source
moving from one side of the object to another by changing the position of the drop shadow from its
beginning and ending frames in the Timeline.
After you apply a filter, you can change its options any time, or rearrange the order of filters to
experiment with a combined effect. You can enable or disable filters or delete them in the Property
inspector. When you remove a filter, the object returns to its previous appearance. You can view the
filters applied to an object by selecting it; doing so automatically updates the filters list in the
Property inspector for the selected object.
About importing filters and blends from Fireworks PNG files (Flash Professional only)
Flash Professional 8 provides support for Fireworks filters and blending modes. When you import
Fireworks PNG files, you can retain many of the filters and blending modes applied to objects within
Fireworks, and continue to modify those filters and blends using Flash Professional 8.
Flash only supports modifiable filters and blends for objects imported as text and movie clips. If an
effect or blend mode is not supported, Flash will rasterize or ignore it when it is imported. If you want
to import a Fireworks PNG file that contains filters or blends that Flash does not support, you must
rasterize the file during the import process. After this operation, you will not be able to edit the file.