Can anyone tell me why I can’t get this to work? When I load another txt file I want the scroll bars _alpha to be 0 if the text does not need to be scrolled. IF it does the scroll bar should be set to 100. I thought this would do it but it does not.
When I launch the movie I have
poemHolder.scrollBar._alpha = 0;
Then when I click the button it sets the scroll bar to 100 whether it needs it or not.
I just want it to be visible if it needs to be.
Thanks for your help.
MovieClip.prototype.loadText = function(url, file, varName, textHolder) {
textLoad = new LoadVars();
textLoad.load(url+file);
textLoad.onLoad = function(success) {
if (success) {
textHolder.html = true;
textHolder.htmlText = this[varName];
textHolder.wordWrap = true;
if (poemHolder.content.scroll>poemHolder.content.maxhscroll) {
poemHolder.scrollBar._alpha = 100;
} else {
poemHolder.scrollBar._alpha = 0;
}
} else {
trace("not loaded");
}
};
};
Then on a button I have
contrib.onRelease = function() {
loadText("poems/", "poem1.txt", "varb", poemHolder.content);
};