# \[FMX\] Question about external text files

**URL:** <https://forum.kirupa.com/t/fmx-question-about-external-text-files/91871>\
**Category:** Uncategorized\
**Created:** [October 9, 2003, 11:00pm UTC](https://forum.kirupa.com/t/fmx-question-about-external-text-files/91871 "2003-10-09T23:00:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maizoon](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@Maizoon](https://forum.kirupa.com/u/Maizoon)\
**Post date:** [October 9, 2003, 11:00pm UTC](https://forum.kirupa.com/t/fmx-question-about-external-text-files/91871/1 "2003-10-09T23:00:16Z")

</div>

Hi, I was wondering if was possible to take this code:

loadText = new loadVars();  
loadText.load(“this.txt”);  
//creating the loadVarsText function  
loadText.onLoad = function(success) {  
if (success) {  
// trace(success);  
poemBox.html = true;  
poemBox.htmlText = this.Poems;  
}  
};

And instead of having the  
loadText.load(“this.txt”)  
have it be a variable like  
loadText.load(\_global.currentPoem);

Thus allowing multiple buttons to use the same code or does each button require its own code in order to load different files?
