MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 323

Actionscript 2.0 language reference
Table of Contents

Advertisement

- Frequency to use in the y direction. For example, to generate a noise that is
baseY:Number
sized for a 64 x 128 image, pass 128 for the
numOctaves:Number
this noise. Larger numbers of octaves create images with greater detail. Larger numbers of
octaves also require more processing time.
randomSeed:Number
same, you can generate different pseudo-random results by varying the random seed value.
The Perlin noise function is a mapping function, not a true random-number generation
function, so it creates the same results each time from the same random seed.
- A Boolean value. If the value is
stitch:Boolean
transition edges of the image to create seamless textures for tiling as a bitmap fill.
fractalNoise:Boolean
noise; otherwise, it generates turbulence. An image with turbulence has visible discontinuities
in the gradient that can make it better approximate sharper visual effects, like flames and
ocean waves.
channelOptions:Number
To create this value, you can use or combine any of the four color channel values:
(green),
(blue), and
4
operator; for example, you can combine the red and green channels by using the following
code:
.
1 | 2
grayScale:Boolean
created by setting each of the red, green, and blue color channels to identical values. The
alpha channel value is not affected if this value is set to
[optional] - An array of points that correspond to x and y offsets for each
offsets:Object
octave. By manipulating the offset values you can smoothly scroll the layers of a perlinNoise
image. Each point in the offset array affects a specific octave noise function.
Example
The following example shows how to apply Perlin noise to to a BitmapData object.
import flash.display.BitmapData;
var bitmapData_1:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var bitmapData_2:BitmapData = new BitmapData(100, 80, false, 0x00FF0000);
var mc_1:MovieClip = this.createEmptyMovieClip("mc",
this.getNextHighestDepth());
mc_1.attachBitmap(bitmapData_1, this.getNextHighestDepth());
- Number of octaves or individual noise functions to combine to create
- The random seed number to use. If you keep all other parameters the
- A Boolean value. If the value is
[optional] - A number that indicates one or more color channels.
(alpha). You can combine the channel values by using the logical OR
8
[optional] - A Boolean value. If the value is
value.
baseY
, the method attempts to smooth the
true
, the method generates fractal
true
. The default value is
true
BitmapData (flash.display.BitmapData)
(red),
1
, a grayscale image is
true
false
2
.
323

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?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF