530
Animation, Filters, and Drawings
3.
Select Control > Test Movie to test the document.
Move your mouse pointer around the Stage to re-create a displacement map by calling the
perlinNoise()
method, which changes the appearance of the JPEG image.
Manipulating filter effects with code
Flash Basic 8 and Flash Professional 8 let you dynamically add various filters to your movie
clips, text fields, and buttons on the Stage, instead of having to add filters in the Flash
Professional 8 authoring environment (using the Filters tab in the Property inspector). When
you add and manipulate filters during playback, you can add realistic shadows, blurs, and
glows that react to mouse movements or user events.
For examples of how to manipulate filters with code, see the following topics:
■
“Adjusting filter properties” on page 530
■
“Animating a filter by using ActionScript” on page 532
■
“Using the clone() method” on page 533
Adjusting filter properties
The array of filters applied to an object can be accessed through standard ActionScript calls by
using the
MovieClip.filters
property. This process returns an array that contains each filter
object currently associated with the MovieClip. Each filter has a set of properties unique to
that filter. The filters can be accessed and modified just like an array object, although getting
and setting the filters by using the
filters
property returns a duplicate of the filters object
instead of a reference.
Summary of Contents for FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Page 1: ...Learning ActionScript 2 0 in Flash...
Page 8: ...8 Contents...
Page 18: ...18 Introduction...
Page 30: ...30 What s New in Flash 8 ActionScript...
Page 66: ...66 Writing and Editing ActionScript 2 0...
Page 328: ...328 Interfaces...
Page 350: ...350 Handling Events...
Page 590: ...590 Creating Interaction with ActionScript...
Page 710: ...710 Understanding Security...
Page 730: ...730 Debugging Applications...
Page 780: ...780 Deprecated Flash 4 operators...
Page 830: ...830 Index...