views:

265

answers:

1

I have a Movieclip on stage with nested movieclips inside. All referenced at 0,0. None of the child movieclips load any dynamic content, animate or have Masked Layers. It does have an input textfield in one of the child MCs. The parent MC shows 280 px width, while it returns 313 px with a .width trace. There is no code that alters the .width value of the parent MC at run-time. And the ParentMC on stage is not scaled (it is at 100% width/height).

Any pointers, to what could be the reasons for the discrepancy in .width values on stage and on run-time? Its breaking the scaling code that follows.

+1  A: 

Check the autoSize property of the TextField. The size of a text field will vary according to the content if its autoSize property is set to anything other than the default TextFieldAutoSize.NONE.

Another possibility is custom drawing - are you performing any programmatic drawing that might increase the width? For instance, if you draw a circle of diameter 100px on shape whose size was initially set to 50x50, the width and height properties will read 100 and not 50.

Amarghosh
Thanks for the reply :) The textfield is indeed .NONE. No Custom drawing either. Its just a bunch of UI elements (Movieclips) that have subsequent popups(movieclips). Everything is designed inside the Flash IDE itself.
Sawrb