Проблема видимо в том, что картинки считаются непрозрачными, поэтому альфа слоя у них не было.
А в вашем случаи и картинок не надо, все можно сделать обынчми заливками
Код:
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
import flash.geom.Matrix;
//
var bFront:BitmapData = new BitmapData (768, 60, true, 0xFF338700);
var bFrontAlpha:BitmapData = new BitmapData (bFront.width, bFront.height, true, 0xFF000000);
//
var rect:Rectangle = new Rectangle (0, 0, bFront.width, bFront.height);
var point:Point = new Point ();
var matrix:Matrix = new Matrix ();
bFrontAlpha.copyChannel (bFront, rect, point, 8, 1);
//
this.attachBitmap ( new BitmapData (bFront.width, bFront.height, true, 0xFF940000), 1);
this.attachBitmap (bFront, 2);
this.attachMovie ("Brush", "Brush", 3, {_visible:false});
//
this._x = 0;
this._y = 0;
//
var MouseDown:Boolean = false;
MouseDown = true;
//this.onMouseDown = function() { MouseDown = true }
//this.onMouseUp = function() { MouseDown = false }
this.onEnterFrame = function () {
this.BrushCursor._x = this._xmouse;
this.BrushCursor._y = this._ymouse;
if (MouseDown) {
matrix.tx = this._xmouse;
matrix.ty = this._ymouse;
bFrontAlpha.draw (Brush, matrix);
bFront.copyChannel (bFrontAlpha, rect, point, 1, 8);
}
};
//
// UI
//
this.attachMovie ("BrushCursor", "BrushCursor", 4, {blendMode:1});
|