Scrollable texts in MX

This is regarding the tutorial at Kirupa.
http://www.kirupa.com/developer/mx/dynamic_scroller.htm

For loading the text from a txt document i am using the following code (which is the same as Kirupa’s code - except for the names)
[AS]
/* Load Welcome Message /
loadText = new LoadVars();
loadText.load(“welcome.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scrollableText.text = this.welcometext;
};
/
End of Welcome Messge */
[/AS]

However, only the first three words of the txt doc file is displayed.

I am not using the component scroller but using my own buttons and codes for scrolling vertically. Those codes are:
[AS]
on (press, release, keyPress “<Up>”) {
currentScroll = scrollableText.scroll;
if (Number(currentScroll)>1) {
scrollableText.scroll = currentScroll-1;
}
}

on (press, release, keyPress “<Down>”) {
currentScroll = scrollableText.scroll;
if (Number(currentScroll)<Number(scrollableText.maxscroll)) {
scrollableText.scroll = Number(currentScroll)+1;
}
}
[/AS]

If i declare the value of the variable “scrollableText” within the actions panel then it works.

Would you believe it? I close the flash program and restarted it and it worked!

Wonder wat the magic is!!!

:whistle:

Now me thinks if there is a way to go about unloading the txt file??? I have looked at the functions of flash but could find nothing that could be of help.

Any suggestions???

got it. but i cant unload. just give a null value to the textbox.

now I am stuck. I converted the dynamic text loading into the prototype on the main time line.
[AS]
MovieClip.prototype.hometext = function() {
loadText = new LoadVars();
loadText.load(“a.txt”);
//creating the loadVarsText function
loadText.onLoad = function() {
scrollableText.text = this.b;
};
/* End of Welcome Messge */
}
[/AS]

now i goto into a button (which) is not the main time line and give this code
[AS]
on (release) {
.
_root.hometext();
}
[/AS]

This button in the main time line is a movie clip - but acts as a button once u get into it by pressing CTRL-E. (sorry dont know the terminology yet)

So the on release event is not on the main timeline. The above doesnt work. I have tried variations like:
[AS]
_parent.hometext();
this._root.hometext();
this._parent.hometext();
[/AS]

dont work. Am i doing the right thing here?