Hi, need some help becouse cant find anything to much about floodfill
Why floodFill wont work when my BitmapData transparency is set to | true | ? I need to fill parts of my image (png with transparency), when my BitmapData transparency is set to false my code works fine, but when its set to true, parts of my image are floodfill with wihte color only, even when floodfill fill color is set to for example red…
i need only to fill black parts, rest should be transparent. is there some kind of trick to make it work properly ?
my code:
import flash.display.BitmapData;
var fillRed = 0x00FF0000;
var Bmp:BitmapData = new BitmapData(301, 577, false, 0xFFFFFF);
var clip = this.createEmptyMovieClip("p", 1);
clip.attachBitmap(Bmp, clip.getNextHighestDepth(), auto, true);
Bmp.draw(mc);
mc._visible = false;
clip.onPress = function() {
Bmp.floodFill(_xmouse, _ymouse, fillRed);
};
sorry for my poor english and thanks for any help.