I have read many of the threads and viewed the tutorials(macromedia) on this, but still cannot make this work. I am just trying to make a text box that I can fill with text from a separate text file. Is there an easier code than what I have copied below?
text file is called
test.txt
var1=blablabla (i have tried &var1=blabla and "&var1=blabla" and &var1=blabla&)
FlashFile-mx04
dynamic textbox instance named "scroller"
in the timeline actions i placed the following code:
loadVarsText = new loadVars();
loadVarsText.load("test.txt"
;
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading"
;
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded"
;
}
};
There it is.
By the way, is the scrollbar component missing in MX2004?
I don't have it in my version.
I'd gladly pay you on Thursday
for a hamburger today!
text file is called
test.txt
var1=blablabla (i have tried &var1=blabla and "&var1=blabla" and &var1=blabla&)
FlashFile-mx04
dynamic textbox instance named "scroller"
in the timeline actions i placed the following code:
loadVarsText = new loadVars();
loadVarsText.load("test.txt"
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading"
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded"
}
};
There it is.
By the way, is the scrollbar component missing in MX2004?
I don't have it in my version.
I'd gladly pay you on Thursday
for a hamburger today!