1 Reply Latest reply on Dec 28, 2007 6:35 PM by peterent

    UIComponents ignore graphics API for width/height


      I'm stuck on a problem here and maybe you guys could suggest another way to solve it because the method I have been attempting seems impossible given the implementation of UIComponent. My system needs to be able to getPixel() the data around the mouse while it is hovering over certain UI elements currently represented by UIComponent. The elements are drawn totally with the graphics API (this is a paint program). Currently, I'm:

      1. Making a new BitmapData
      2. Using draw() to copy the UIComponent into the BD (like draw(myUIComponent...))
      3. getPixel() ing the BD

      Unfortunately, the BD didn't seem to be copying. I have found that this is probably because the UIComponent returns a width and height of zero since it's drawn exclusively with the graphics API.

      Any ideas on how to accomplish this?