Flex masking issue
September 30th, 2010
Hello! Let’s imagine: you’r making some custom MXML component and want it to have rounded corners or mask it in some different way and you have few such components inside container. After launch component content does not respond and it has similar to “hang” state. I don’t know may be this is some bug or anything else in Flex, but if you have few similar components ( for example MyComponent) in the same container, you will see this issue.
Solution:
To solve this issue just add another wrap(container), for example Canvas, inside you component and put there all your content, and mask this is container instead of actually component.
So your code should looks like this:
<?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"> <!-- ... any code there ... --> <mx:Canvas id="containerToMask" mask="{customMask}"> <!-- content --> </mx:Canvas> </mx:Canvas>



