MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 304

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
sourceBitmap:flash.display.BitmapData
image can be a different BitmapData object or it can refer to the current BitmapData object.
sourceRect:flash.geom.Rectangle
copy channel data from a smaller area within the bitmap, specify a source rectangle that is
smaller than the overall size of the BitmapData object.
destPoint:flash.geom.Point
corner of the rectangular area where the new channel data is placed. If you want to copy
channel data from one area to a different area in the destination image, specify a point other
than (0,0).
sourceChannel:Number
represent red, green, blue, and alpha channels, respectively, or a sum of any of the values.
destChannel:Number
represent red, green, blue, and alpha channels, respectively, or a sum of any of the values.
Example
The following example shows how to copy a source ARGB channel from a
back onto itself at a different location:
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
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.copyChannel(myBitmapData, new Rectangle(0, 0, 50, 80), new
Point(51, 0), 3, 1);
}
See also
Rectangle (flash.geom.Rectangle)
304
ActionScript classes
- The source Rectangle object. If you only want to
- The destination Point object that represents the upper-left
- The source channel. Use a value from the set (1,2,4,8), which
- The destination channel. Use a value from the set (1,2,4,8), which
- The input bitmap image to use. The source
object
BitmapData

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