# Problem loading .txt with loadVars

**URL:** https://forum.kirupa.com/t/problem-loading-txt-with-loadvars/213767
**Category:** Uncategorized
**Created:** [January 23, 2007, 2:41am UTC](https://forum.kirupa.com/t/problem-loading-txt-with-loadvars/213767 "2007-01-23T02:41:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fab100](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@fab100](https://forum.kirupa.com/u/fab100)
#### Post date: [January 23, 2007, 2:41am UTC](https://forum.kirupa.com/t/problem-loading-txt-with-loadvars/213767/1 "2007-01-23T02:41:05Z")

</div>

Hi everyone  
I m trying to load in a .txt file using lthe loadVars object but I can only add one text in my textfield. (my .txt contains different news, i,e: &news1,&news2, &news3, etc  
I have several of these news in my .txt file but something must be wrong in the script as I can only see news1 ( probably I do not know how to add a new variable that calls the following news in my .txt)  
Can anyone help me add the variable ( news2, news3, etc in the script ? here s the code:

System.useCodepage = true;  
//  
var news:LoadVars = new LoadVars();  
news.onLoad = function(ok:Boolean):Void {  
complete();  
};  
news.load(“news1.txt”);  
//  
function complete():Void {  
headline.text = news.headline;  
text.html = true;  
text.htmlText = news.news1;  
createTextField(“tip”, getNextHighestDepth(), 10, 10, 0, 0);  
with (tip) {  
autoSize = true;  
border = true;  
borderColor = 0x009900;  
background = true;  
backgroundColor = 0xffff00;  
}  
var format:TextFormat = new TextFormat();  
with (formato) {  
font = “Arial”;  
size = 10;  
}  
//  
up.onRollOver = function():Void {  
tip.\_visible = true;  
tip.text = “UP”;  
tip.setTextFormat(format);  
onEnterFrame = function ():Void {  
text.scroll–;  
tip.\_x = \_xmouse+10;  
tip.\_y = \_ymouse-20;  
};  
};  
up.onRollOut = function():Void {  
tip.\_visible = false;  
onEnterFrame = null;  
};  
down.onRollOver = function():Void {  
tip.\_visible = true;  
tip.text = “down”;  
tip.setTextFormat(format);  
onEnterFrame = function ():Void {  
text.scroll++;  
tip.\_x = \_xmouse+10;  
tip.\_y = \_ymouse-20;  
};  
};  
down.onRollOut = function():Void {  
tip.\_visible = false;  
onEnterFrame = null;  
};  
}
