ActionScript 3.0 :: Know When A FloodFill Is Done?

May 15, 2009

I've been playing with AS3 bitmap manipulation, cool stuff, but I have a question/concern:

How do I know when a floodFill is done?

I'm floodFill'ing a section of a bitmap, then immediately checking to see if the bitmap is equal to another bitmap with .compare.

If I don't slow the .compare down with a timer (just one second) the compare is comparing the old bitmapData.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: FloodFill Not Working With Transparent BirmapData

Aug 24, 2009

I hav a movie [instance name : myObject] clip with some pattern design in it. Now i hav converted it to Bitmap to use FloodFill method on Runtime. code in which The floodFill not working:

Code:
var bitmapData:BitmapData = new BitmapData(350, 450, true, 0x00FF0000);
bitmapData.draw(myObject);
var con:Bitmap = new Bitmap(bitmapData);

[Code].....

i hav set the transparency to false, it Works. But i hav a object in background that i hav to keep visible to user.

View 0 Replies

ActionScript 3.0 :: MovieClip - FloodFill And Line Crispness - Automatized Color Filling

Dec 18, 2009

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.

[Code]...

View 3 Replies

Flash :: Find The Size Of The Area In A Bitmap Which Has Been Filled Using The Bitmapdata.floodfill Method?

Sep 27, 2011

I am using the floodfill method to colour-in sections of a bitmap image. That part is easy enough but the issue comes in with the way I am adding an effect to the colour fill routine.

To add the effect, first a copy of the bitmap data is created and floodfill is used on that instead of the original bitmap. Then the bitmapdata.compare method is used to set the alpha value of everything apart from the filled-in section to 0 and the result is saved in another bitmapdata. After that, a 1 px radius circle sprite is added to the stage and is being tweened to the image dimensions and its mask is set to the sprite which contains the result of the compare operation.

This works perfectly except for the fact that the fill sprite has to be tweened to the complete image dimensions irrespective of how small the area is being coloured-in since I am not able to find a way to get the dimensions of the fill area. I am doing an bitmap image update at the end of the tween and I have to disable user interaction till the tween is complete to avoid the errors which come in if another fill-in operation is started before the base image has been updated. If I could somehow get the dimensions of the fill area then the time during which I have to disable the user interaction will go down considerably.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved