In our application, we display a bitmap within a UIComponent. When the component is resized, a new bitmap with new dimensions must be generated to replace the old one. I wrote the code to do this within the resize event handler for the UIComponent. However, Flex is apparently resizing child components AFTER the event handler is called. So, it ends up resizing the new bitmap after it has been added to the display list, and the image gets stretched or compressed.
For example, if the UIComponent size is increased by 25%, then my code generates a Bitmap that is (approximately) 25% bigger and adds it to the parent component. Then after the resize handler is finished, Flex/Flash resizes the new bitmap and increases its size by another 25%, and I end up with a bitmap that is 25% bigger than it should be.
Is there a way to stop this behavior? I don't need the bitmap to be resized at all since my own code takes care of that, but I don't see a property that would turn off the automatic resizing.