# AS 2\> Dynamically loaded text to resize container mc

**URL:** https://forum.kirupa.com/t/as-2-dynamically-loaded-text-to-resize-container-mc/274963
**Category:** flash
**Created:** [November 7, 2008, 1:51am UTC](https://forum.kirupa.com/t/as-2-dynamically-loaded-text-to-resize-container-mc/274963 "2008-11-07T01:51:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chilakilez](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@chilakilez](https://forum.kirupa.com/u/chilakilez)
#### Post date: [November 7, 2008, 1:51am UTC](https://forum.kirupa.com/t/as-2-dynamically-loaded-text-to-resize-container-mc/274963/1 "2008-11-07T01:51:20Z")

</div>

Hi there, ive been all day coding and going through search result pages with no luck. Basically, i want to build my own scrollbar from cero. Its all going good, but to make the scrolling thingy i need a mask, a container mc which contains (obviously!) a dynamic text which is loaded externally.  
This is the problem: who do I set the mc to the same height from the dynamic text once is loaded?  
so far, i have accomplished that indeed the mc resizes to the dynamic text height, though all the text scales as well… who do i do it without the text itself scaling?

These guys had the same questions though i could find a proper andwer in the posts:

> **[Movie Clips and TextFields?](https://www.kirupa.com/forum/showthread.php?t=197470&highlight=resize+dynamic+text+movie+clip)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

> **[resize dynamic text field with actionscript](https://www.kirupa.com/forum/showthread.php?t=192817&highlight=resize+dynamic+text+movie+clip)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

My last effort contained this script on the containcer mc:

```auto
onClipEvent(load) {
this._yscale = this.instance_text.textHeight;
}

```
