Hello.
I would like to have text box(movieclip) to update itself with different text content upon button click(i have afew buttons in a different movieclip)
Text is being retrieved from a text file. i have couple of text files with different content in them.
My current text box ActionScript looks as such:
myData = new LoadVars();
myData.onLoad = function(){
dyntext.htmlText = this.content;
};
myData.load(company.txt);
stop();
To acomplish the above question i decided to go with a global variable that will substitute file (txt) name so itll become :
...
myData.load(testtxt);
On my buttons ActionScript i set the following:
on (press) {
testtext='services.txt';
}
Unfortunately , nothing is happening when the button is clicked. What am i doing wrong?
Thanks
I would like to have text box(movieclip) to update itself with different text content upon button click(i have afew buttons in a different movieclip)
Text is being retrieved from a text file. i have couple of text files with different content in them.
My current text box ActionScript looks as such:
myData = new LoadVars();
myData.onLoad = function(){
dyntext.htmlText = this.content;
};
myData.load(company.txt);
stop();
To acomplish the above question i decided to go with a global variable that will substitute file (txt) name so itll become :
...
myData.load(testtxt);
On my buttons ActionScript i set the following:
on (press) {
testtext='services.txt';
}
Unfortunately , nothing is happening when the button is clicked. What am i doing wrong?
Thanks