5 Replies Latest reply: Mar 20, 2014 6:02 AM by sivacse24rep RSS

    checkbox and movieclip height issue

    sivacse24rep Community Member

      Hi,

       

      I added a check box component inside a empty movieclip.Before adding the movie clip height is 0,once i added a check box component on the movieclip its height shows 100.But when i saw the height of check box its just 22. whats the issue on calculating the movieclip height?

       

      Here is the coding

          

      var mc:MovieClip=new MovieClip();

      addChild(mc)

       

      var cb:CheckBox= new CheckBox();

      cb.label="tts"

      mc.addChild(cb)

       

       

      trace(cb.height)    // output  22

      trace(mc.height) // ouput 100

       

      Issue:

      I want to calculate the movieclip height on runtime.on the above case i expect the mc height as 22 but it give 100.how to solve this?