# \[CS3/AS2\] textArea maxscroll

**URL:** <https://forum.kirupa.com/t/cs3-as2-textarea-maxscroll/254670>\
**Category:** flash\
**Created:** [March 14, 2008, 2:29am UTC](https://forum.kirupa.com/t/cs3-as2-textarea-maxscroll/254670 "2008-03-14T02:29:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noahott](https://avatars.discourse-cdn.com/v4/letter/n/dbc845/32.png) [@noahott](https://forum.kirupa.com/u/noahott)\
**Post date:** [March 14, 2008, 2:29am UTC](https://forum.kirupa.com/t/cs3-as2-textarea-maxscroll/254670/1 "2008-03-14T02:29:18Z")

</div>

Hi,

I have a text area, content\_txt, that I load html with a stylesheet into using this code:

```auto
//code for loading CSS and text into swf;

function getRotatorStyles() {
        content_txt.text = "loading content";
        // load stylesheet first
        var flash_css = new TextField.StyleSheet();
        flash_css.onLoad = function(success:Boolean) {
                if (success) {
                        content_txt.styleSheet = flash_css;
                        getRotatorContent();
                } else {
                        content_txt.htmlText = "Error - could not load CSS.";
                }
        };
        flash_css.load("cast/style.css");
};

   // load the text into the text box
function getRotatorContent() {
        content_txt.htmlText = "Loading content";
        // we've loaded the StyleSheet now let's load the content from the text file
		
		//start by loading the variables from the text file
		
		
        var my_lv:LoadVars = new LoadVars();
        my_lv.onLoad = function(success){
			if (success){            
                       
                        content_txt.htmlText = my_lv.info;
                } else {
                        content_txt.htmlText = "A problem has been detected";
                }              
        };
        my_lv.load("cast/cast.htm");
};

```

The problem is that content\_txt.maxscroll always returns 1, but I know from testing that the actual value is 121. content\_txt.htmlText.maxscroll, content\_txt.text.maxscroll, content\_txt.\_text.maxscroll, all return undefined. How can I get an accurate value of maxscroll for this text area? I need it to get a custom scroll bar to work correctly.

Any insight is appreciated. Thanks,

-Noah
