MovieClip
831
matrix
:flash.geom.Matrix
[optional] - A matrix object (of the flash.geom.Matrix class),
which you can use to define transformations on the bitmap. For instance, you can use the
following matrix to rotate a bitmap by 45 degrees (pi/4 radians):
var matrix = new flash.geom.Matrix();
matrix.rotate(Math.PI/4);
repeat
:Boolean
[optional] - If
true
, the bitmap image repeats in a tiled pattern. If
false
,
the bitmap image does not repeat, and the edges of the bitmap are used for any fill area that
extends beyond the bitmap.
For example, consider the following bitmap (a 20 x 20-pixel checkerboard pattern):
When
repeat
is set to
true
(as in the following example), the bitmap fill repeats the bitmap:
When
repeat
is set to
false
, the bitmap fill uses the edge pixels for the fill area outside of the
bitmap:
smoothing
:Boolean
[optional] - If
false
, upscaled bitmap images are rendered using a
nearest-neighbor algorithm and look pixelated. If
true
, upscaled bitmap images are rendered
using a bilinear algorithm. Rendering using the nearest neighbor-algorithm is usually much
faster. The default value for this parameter is
false
.
Example
The following code defines a simple bitmap, and then uses
beginBitmapFill()
to fill a
movie clip with that bitmap tiled:
import flash.display.*;
import flash.geom.*;
var bmpd:BitmapData = new BitmapData(20,20);
var rect1:Rectangle = new Rectangle(0,0,10,10);
var rect2:Rectangle = new Rectangle(0, 10, 10, 20);
var rect3:Rectangle = new Rectangle(10, 0, 20, 10);
var rect4:Rectangle = new Rectangle(10, 10, 20, 20);
bmpd.fillRect(rect1, 0xAA0000FF);
bmpd.fillRect(rect2, 0xAA00FF00);
bmpd.fillRect(rect3, 0xAAFF0000);
bmpd.fillRect(rect4, 0xAA999999);
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...