Hi,
I have a text area, content_txt, that I load html with a stylesheet into using this code:
//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