Load Vars Function Not working

Hi there.
I am trying to make a button that when clicked on loads an external text file into a dynamic text box.

I can make it work when I use it specifically - but I can’t make it work when I want to use it as part of a generic ‘button function’.

Basically I have a .txt file “mycontent.txt” which is called using the Load Vars function inside a generic function (tab_grow) i created to managed the behavior of the 12 tabs that are the navigation for the movie. For now i’m just focusing on ONE of the tabs. Basically the tabs move when a user hovers over them and when they mouse off. When they click it should call the external text file. The section in the .txt i’m calling is called ‘mega_data’.

This is what I have right now:

function tab_grow(mov, file) {
    mov.onRollOver = function() {
        mov.onEnterFrame = function() {
            if (mov._y <= 80) {
                mov._y = 80;
            } else {
                mov._y -= 2;
            }
        };
    };
    mov.onRollOut = function(){
        mov.onEnterFrame = function(){
            if (mov._y >= 104){
                mov._y = 104;
            }else {
                    mov._y += 2;
                }
                }
            }
    mov.onRelease = function() {
    myData = new LoadVars();
    myData.onLoad = function() {
        myText_text.text = this.file;
    };
    myData.load("mycontent.txt");
    stop();
};
}

tab_grow(but1, mega_data);

Everything works pefectly except when I click the button it doesn’t call the file.

HOWEVER if I change the function and make it specific (so just change the part shown) it loads the text correctly…:

mov.onRelease = function() {
    myData = new LoadVars();
    myData.onLoad = function() {
        myText_text.text = this.mega_data;
    };
    myData.load("mycontent.txt");
    stop();
};
}

tab_grow(but1);

BUT then I can’t change which section of the .txt file I pull up for different tabs - which is the whole point of the function!!

Any ideas would be much appreciated. Also apologies if this is bad coding - i’m still learning with Action Script so tend to have redundancy in my code.

Thanks for any and all help!

Tim