469
13
CHAPTER 13
Animation, Filters,
and Drawings
This chapter describes how to add animation to your Macromedia Flash Basic 8 and
Macromedia Flash Professional 8 applications using ActionScript instead of (or in addition to)
timeline-based animations that use motion or shape tweens. Using code to create animation
and effects often reduces the file size of your finished application, and can also improve the
performance and consistency of the animation itself. At times, ActionScript-based animations
might even reduce your workload: code can be faster to write, and it’s easy to apply to many
instances at once or reuse in other applications. This chapter also shows you how to animate
by using fundamental ActionScript basics, the Tween and TransitionManager classes, the
Drawing API, filter classes, and blend modes.
You can use the Drawing API, which consists of the drawing methods in the MovieClip class,
to add animation and draw. These methods let you use code to create lines, fills, and shapes,
instead of using the drawing tools in the authoring tool.
Filters and other expressive effects are also important in many Flash applications, to quickly
apply an effect and animate it. You can use code to add and animate filter effects, blend
modes, and bitmap images.
This chapter contains the following sections, which describe using ActionScript to create
animation and add effects, as well as using the Drawing API to draw in ActionScript:
Scripting animation with ActionScript 2.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470
About bitmap caching, scrolling, and performance . . . . . . . . . . . . . . . . . . . . . . . . . 480
About the Tween and TransitionManager classes . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
Using filter effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Working with filters using ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
Manipulating filter effects with code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
Creating bitmaps with the BitmapData class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .534
About blending modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .537
About operation order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Drawing with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
Understanding scaling and slice guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
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...