I’m trying to load text dynamically from a text file into a dynamic text box. The text box is inside a movie clip that’s being scrolled with a ScrollPane component.
When I test the my site locally, everything works fine. However, when I upload it and test the page, the size of the text box is not recognized right away. The scroll bar on the ScrollPane component isn’t there. I have to refresh the page in order for the scrollbar to show up and the text box to be sized properly. I’m not sure what the issue is. Here’s the script I’m using:
events.autoSize=true;
events.html=true;
eventsLoadVar = new LoadVars ();
eventsLoadVar.load(“documents/events.txt”);
eventsLoadVar.onLoad = function (success){
if (success == true) {
events.htmlText=eventsLoadVar.eventstext;
}
}
It’s driving me nuts because I can’t figure it out!