I’m making a little coloring “game” for kids. The user selects a image (our originals are flash vectors), use the color picker to choose a color and click on parts of the image to color it as desired. Really simple stuff.
Now I’m trying to implement the program with automatized color filling (the old program requires that each part to be colored have to be a separate movie clip). After much research, I failed to find a method like the floodFill in BitmapData for MovieClips, so I tried to take a snapshot of the image as Bitmap with the BitmapData.draw method and use the floodFill directly.
It works, the fills are colored correctly, but there’s one big visual problem:
The lines are from the original drawing, the black fill was added as a test using the new code. Note the white edges around the lines created by the BitmapData.draw() algorithm. They are especially visible when the filling color is dark.
I’ve tried to superimpose the original over the snapshot to cover this defects, but it didn’t help much. Setting “smoothing” to true in the bitmap and the “draw” method didn’t make much difference either.
Is there any “floodFill” like method for MovieClips? If not, how can I avoid this white pixels around the lines or at least hide them?