# Dynamic hight on scroll component

**URL:** <https://forum.kirupa.com/t/dynamic-hight-on-scroll-component/177021>\
**Category:** Uncategorized\
**Created:** [January 29, 2006, 12:03pm UTC](https://forum.kirupa.com/t/dynamic-hight-on-scroll-component/177021 "2006-01-29T12:03:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bnet](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@Bnet](https://forum.kirupa.com/u/Bnet)\
**Post date:** [January 29, 2006, 12:03pm UTC](https://forum.kirupa.com/t/dynamic-hight-on-scroll-component/177021/1 "2006-01-29T12:03:47Z")

</div>

Hi  
I have downladed the “_dynamic\_scroller.fla_” ([FONT=Arial][SIZE=1][COLOR=#808080]I think it was the one made by by [/COLOR][/SIZE][/FONT][[FONT=Arial][SIZE=1][COLOR=#808080]kirupa chinnathambi[/COLOR][/SIZE][/FONT]](http://www.kirupa.com/me/index.htm)).

It works fine, but I can’t figure out how to set the hight dynamically! The textField I have set up can have different hight depending on how much space another textField (header) above needs. Think of HeaderText and a bodyText that togheter use a fixed height  
(_fixed height = header.\_height + body.\_height_)

The scroll then needs to bee set to a height that fits the body textFields height. If I just set  
_myScrollCompMc.\_height = body.\_height_  
…the scroll will be squeesed or streched sometimes.

Do you know a better way to do this. How can I attach the scroll comp after I set up the textFields and when I know the body height.  
Is there a way to set(mayby reload in some way) the height on the scroll by some code/function?

Plz help me.

PS. I am not so fimiliar with AS 2.0  
I only wrights in AS 1.0 …so far! DS.
