A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Bitmap Dtata flood fills problems

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    15

    Bitmap Dtata flood fills problems

    Hi guys,

    I am doing a small application which will allow the user to draw with different tools, something like paint. But now, I want to do a paint bucket and I got some problems.

    I am using Bitmap Data to do it, so I draw the movieClip on the bitmap data, but when I want to apply the flood fills, it didn't fills the shape perfectly, because near the border, the pixels are not the same color as the one I click on.

    Is there a way to fix this, or to change the tolerance of the floodfills? Because if I click on a #FFFF00 pixel, all pixels with this code will be filled, but pixels on the edge of the shape are lighter, so the pixels code is not the same.

    Thanks for your help :-)

  2. #2
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    No, I don't think it's possible to change the tolerance of the floodfill. Sorry...
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  3. #3
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    what you want to do is look into the threshold(); method of the bitmapData Class in the Flash help files.

    zlatan
    New sig soon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center