AlphaGradient Mask doest work (openfl)

Hello Im trying to make a alpha gradient mask - as mirror (openfl)

    var data:BitmapData = new BitmapData(,, true, 0);
	var bit:Bitmap = new Bitmap(data, PixelSnapping.NEVER, true);

    var m:Matrix = new Matrix();
	m.createGradientBox(bit.width, h, Math.PI / 2);
	var msk:Shape = new Shape();"linear", [0xEEEEEE, 0xEEEEEE], [1, 0], [0, 200], m);, 0, bit.width, h);;
	msk.y = object.y + h + distance;
	msk.x = object.x;
	msk.cacheAsBitmap = true;
	bit.cacheAsBitmap = true;
	bit.mask = msk;

No alpha applied :frowning: if i test it without masking - the gradient looks great…

1 Like

Alpha masking is not yet supported, but its a planned feature.

As a workaround, I would recommend using bitmapData.draw to convert your objects to BitmapData, then use bitmapData.copyChannel to copy the alpha channel from one object to the other

1 Like

@singmajesty any update for html5 gradient mask support?