so, i made a layer called text, with a dynamic textfield and called the instance “newsText”. and then wrote the following ascript on a new layer;
myText = new LoadVars();
myText.onLoad = function();
MyText {
newsText.text = this.myVariable;
}
myText.load(“newstext.txt”);
i manage to load the text, but i got the following mesage, and i don´t understand why it complains about “Ext_text” and “test.txt” since I changed it to “myText” and “newstext.txt” :-/
Error Symbol=newstext bar 1, layer=newsbar, frame=1:Line 1: Statement must appear within on/onClipEvent handler
Ext_text = new LoadVars();
Error Symbol=newstext bar 1, layer=newsbar, frame=1:Line 2: Statement must appear within on/onClipEvent handler
Ext_text.onLoad = addText;
Error Symbol=newstext bar 1, layer=newsbar, frame=1:Line 3: Statement must appear within on/onClipEvent handler
Ext_text.load(“test.txt”);
Error Symbol=newstext bar 1, layer=newsbar, frame=1:Line 4: Statement must appear within on/onClipEvent handler
function addText() {