O'Reilly logo

Learning ActionScript 3.0, 2nd Edition by Rich Shupe, Zevan Rosser

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Drawing with Pixels

IN THIS CHAPTER

Bitmap Caching

The BitmapData Class

Blend Modes

Bitmap Filters

Color Effects

Image Encoding and Saving

Adding Functionality to Your Color Picker

What’s Next?

Though largely known for its focus on vector assets, ActionScript also has an impressive arsenal of bitmap compositing features—options that work by layering, blending, and filtering pixel-based assets. ActionScript can even take a snapshot of vectors and manipulate the snapshot—behind the scenes with no loss in vector quality—giving you additional compositing options and, in many cases, performance gains.

Although it’s unrealistic to expect ActionScript to achieve the feature breadth and depth of a pixel-editing application like Adobe Photoshop, you really can accomplish quite a bit with it. Among others, ActionScript features include a set of blend modes (darken, lighten, multiply, screen, and others that closely resemble Photoshop blend modes), basic filters (like drop shadow, bevel, and blur, akin to Photoshop layer styles), and advanced filter effects (like convolution and displacement mapping, similar to Photoshop filters).

Today, ActionScript 3.0’s speed and efficiency make bitmap manipulation practical in more processor-intensive scenarios than ever before. In this chapter, we’ll discuss several ways to add pixel pushing to your projects, including:

  • Bitmap Caching. Moving pixels on screen is a lot more efficient than recalculating the math required to display moving vectors every time ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required