0

我有一个主要有两种颜色作为背景的png。我想知道 as3 是否提供了选择颜色以使其透明的方法。

4

2 回答 2

0

一种选择是使用 BitmapData 方法 threshold :

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html#threshold%28%29

public function threshold(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false):uint
于 2012-12-26T20:46:21.113 回答
0

看一下 BitmapData 类。

您可以获取每个像素的颜色并为其中一些设置透明度。

于 2012-12-26T17:50:48.443 回答