Copychannel (Bitmapdata.copychannel Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example shows how to apply a color transform operation to a BitmapData
instance.
import flash.display.BitmapData;
import flash.geom.ColorTransform;
var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
mc.onPress = function() {
myBitmapData.colorTransform(myBitmapData.rectangle, new
ColorTransform(1, 0, 0, 1, 255, 0, 0, 0));
}
See also
ColorTransform (flash.geom.ColorTransform)

copyChannel (BitmapData.copyChannel method)

public copyChannel(sourceBitmap:BitmapData, sourceRect:Rectangle,
destPoint:Point, sourceChannel:Number, destChannel:Number) : Void
Transfers data from one channel of another BitmapData object or the current BitmapData
object into a channel of the current BitmapData object. All of the data in the other channels
in the destination BitmapData object are preserved.
The source channel value and destination channel value can be one of following values or a
sum of any of the values:
(red)
1
(green)
2
(blue)
4
(alpha)
8
Availability: ActionScript 1.0; Flash Player 8
,
Rectangle (flash.geom.Rectangle)
BitmapData (flash.display.BitmapData)
303

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF