Archive for June, 2009

Hidden $addChild for Flex Components

0

Ever try to add a DisplayObject to a Flex Component? If you have, you know the run-time engine will complain about a type conversion (Adobe casts DisplayObjects to IUIComponents). Well, there is a hidden $addChild for UIComponents. To utilize simply add use namespace mx_internal; to the beginning of your script. Now you can use $addChild.

For more information, check out http://www.boostworthy.com/blog/?p=224.

Popularity: 5% [?]

DisplayObject.scrollRect dimension reporting workaround

0

I came across a bug where when you set the scrollRect of a DisplayObject and get a dimension, within the first few mil/nano-seconds it reports the correct width and height. However, after that the reported width and height is the scrollRect‘s width and height. This to me is a bug considering you can not request the object to tell you it’s full dimensions any longer.

Take a look at http://www.kirupa.com/forum/archive/index.php/t-256884.html and here is the solution http://usecake.com/lab/find-the-height-and-width-of-a-sprite-with-a-scrollrect.html

Popularity: 24% [?]

Go to Top