0 Replies Latest reply on May 16, 2006 8:53 AM by Nixy

    Optimizing code help with BitmapData

    Nixy Level 1
      Hi
      I'm new to the BitmapData Class. I've work a bit with that and that works fine. The problem was that it does many things, but not exactly what I need. So I've create my own functions. Here it is.

      1 - With the BitmapData object, it allow us to check a pixel color. What I needed was to check a range of color not a specific color.
      2 - You can also create a rectangle if you specify a specific color to search in the img. I wanted was to create a rectangle shape but with a specific range of color not just a specific color.

      Well I just create these 2 functions as I need. They works fine. What I whant is to optimize it. Actually there is 2 versions of the function that create the rectangle shape. The second one is 1 second faster. I want to share it because I know that there is some people that can modify it to get a better performance. You can do what you want with that code, just keep me informed if you can optimize it.

      Here is the link you can find the fla : http://www.november7.ca/BitmapDataExtended/BitmapDataExtended.fla

      Tanx