Working with filters using ActionScript
515
3.
Select Control > Test Movie to test the document.
The amount of horizontal and vertical blurring is calculated by the mouse pointer’s
current
_xmouse
and
_ymouse
position. As you move the mouse pointer to the upper-left
corner of the Stage, the amount of horizontal and vertical blurring decreases. Conversely,
as the mouse pointer moves to the lower-right corner of the Stage, the amount of
horizontal and vertical blurring increases.
Creating gradient glows
The GradientGlowFilter class lets you create a gradient glow effect for a variety of objects in
Flash. A gradient glow is a realistic-looking glow with a color gradient that you can specify.
You can apply a gradient glow around the inner or outer edge of an object or on top of
an object.
For more information on this filter, see GradientBevelFilter
(flash.filters.GradientBevelFilter) in the
ActionScript 2.0 Language Reference
.
The following procedure uses the Drawing API to draw a square on the Stage, and then
applies a gradient glow filter to the shape. Clicking the square on the Stage increases the filter’s
strength, whereas moving the mouse pointer horizontally or vertically modifies the amount of
blurring along the
x
-axis or
y
-axis.
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...