Be the first to write a review
Working with Bitmaps in Flash 8 - part 2
If you completed part 1 of this article series, you’ll have learned about the BitmapData class. I showed you how to create a BitmapData object and we worked with it in different ways: displaying it within a movie clip, creating noise and using floodFill. Remember, that the Flash Player doesn’t redraw bitmaps each frame as it does with vector images.
In this article I’ll look at:
- Working with pixels
- Using the draw method
- Applying filters to BitmapData objects
We’ll work with several examples and even create a simple application that samples colours from a photo. You’ll need to have completed part 1 of the article before you tackle part 2 as it explains a lot of the background behind the code we’ll be using here. Note that there are other methods of the BitmapData object that I won’t cover in either of the two articles.
You’ll need a copy of Flash 8 to work through this article. You can download a trial copy from the Macromedia Web site. Note that the code samples within the article all use AS2.0.
You can download the files referred to in the tutorial from the blue Properties box that contains the article PDF. There's a heading titled Code Download and you can click the Details link next to it to get the zip file.
Note: If you have difficulties downloading the source files or PDF, you might have a problem with your cookies. Delete the cookies from your machine and try again. In Internet Explorer, you can do this by choosing Tools > Internet Options… and clicking the Delete Cookies… button on the General tab.
We’ll start by looking at how you can work with individual pixels.
This article is part of the new interactive e-book; Out of my mind: Flash 8 Power
Sas Jacobs
Hello. I'm the Principal of Anything Is Possible, an Australian web development business specialising in web applications development and training. I'm interested in using Flash with dynamic content and I've presented at a number of International conferences on topics relating to applications development, XML and scripting components. I have recently released my second print book Beginning XML with DOM and Ajax to match the first one - Foundation XML for Flash. I have a business web site
and a personal web site.