Flash MX : loading external text problem

Help…I’ve grabbed this code from the tutorials section and it works fine. I’m now trying to adapt it so that I can use it in a function. I’m calling the function from a deeply nested button and trying to load the text into a deeply nested textfield. I’ve located which part of the code is giving me trouble but am having trouble sorting it. Any help would be great.

function contentLoad (contentTitle, contentFile, contentId) {
_root.mc_contentMain.mc_bodyText.txt_title.text = contentTitle;
// text loading function below
loadText = new LoadVars();
loadText.load(contentFile);
//creating the loadVarsText function
loadText.onLoad = function() {
_root.mc_contentMain.mc_bodyText.txt_textContent.htmlText = this.contentId;
_root.mc_contentMain.mc_bodyText.txt_textContent.scroll = 1;
}

Basically line 8 is the troublesome one.

_root.mc_contentMain.mc_bodyText.txt_textContent.htmlText = this.contentId;

contentId is obviously the variable name at the start of my text file, but I don’t understand what the ‘this.’ relates to when accessing the text from the external text file. Surely it can’t be the path to the text file as in the original tutorial the code is attached to a button - and the text file sure as hell ain’t in the button…

If anyone can shed any light on this I’d be grateful.
Cheers - D

this is the loadVars object.
what you want to do here, one txt file with various parts…?
better to load only the one you need!
no contentId param needed…

Thanks eyezberg, not sure if this is what you mean but I’ve been playing around and this seems to work much better - far less code too:

loadVariables(“someTextfile.txt”, “pathToTextfield”);