mxml - Flex 4 UIMovieClip Modify the Width of a Child DisplayObject -


i have collection of uimovieclip components reside in s:hgroup tag. in actionscript code modifying width of child clip in 1 of uimovieclips these changes not reflected s:hgroup.

<s:hgroup id="_buttongroup">     <uiassets:navigationtabbuttonswc id="_lobby" />     <uiassets:navigationtabbuttonswc id="_achievements" /> </s:hgroup> <fx:script>     <![cdata[         protected function init() : void         {             // hgroup not pickup change , buttons             // no longer evenly spaced out , overlap!             _lobby.getchildbyname("background").width += 200;         }     ]]> </fx:script> 

thanks!

there's few reasons this. changing 1 child's width doesn't mean it'll change whole uimovieclip's width, should check first.

second, flex has specific way of doing things (called component lifecycle), uimovieclip doesn't implement can't manage width in 'measure' function. i'm guessing have other children in movieclip doesn't let resize all. try changing width of movieclip , should work. if doesn't, there's problem.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -