Noise (Bitmapdata.noise Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

var mc_2:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc_2.attachBitmap(bitmapData_2, this.getNextHighestDepth());
mc_2._x = 101;
mc_1.onPress = function() {
bitmapData_1.merge(bitmapData_2, new Rectangle(0, 0, 50, 40), new
Point(25, 20), 128, 0, 0, 0);
}

noise (BitmapData.noise method)

public noise(randomSeed:Number, [low:Number], [high:Number],
[channelOptions:Number], [grayScale:Boolean]) : Void
Fills an image with pixels representing random noise.
Availability: ActionScript 1.0; Flash Player 8
Parameters
randomSeed:Number
[optional] - The lowest value to generate for each channel (0 to 255). The
low:Number
default is 0.
[optional] - The highest value to generate for each channel (0 to 255). The
high:Number
default is 255.
channelOptions:Number
color channel values:
operator
to combine channel values. The default value is
|
grayScale:Boolean
created by setting all of the color channels to the same value. The alpha channel selection is
not affected by setting this parameter to
Example
The following example shows how to apply pixel noise to a BitmapData object for both a
color and black-and-white bitmap.
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
var bitmapData_1:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var bitmapData_2:BitmapData = new BitmapData(100, 80, false, 0x00FF0000);
- The random seed to use.
[optional] - A number that can be a combination of any of the four
(red),
(green),
(blue), and
1
2
4
[optional] - A Boolean value. If the value is
true
(alpha). You can use the logical OR
8
(1 | 2 | 4)
true
. The default value is
BitmapData (flash.display.BitmapData)
.
, a grayscale image is
.
false
319

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?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents