Answered
add variable to a variable..?
I want to load a piece of text into a textfield depending on
his variable with the variable id from the button. Can it be done?
And how can I fix this? With this example below flash can't
recognized the part of the text he nead.
id = 2
_root.textload = "textfile.txt"
this.onRelease = function() {
titel = ("titel"+(id));
subtitel = ("subtitel"+(id));
maintext = ("maintext"+(id));
_root.mc_index.thisText = new LoadVars();
_root.mc_index.thisText.editable = false;
_root.mc_index.thisText.load(_root.textload);
_root.mc_index.thisText.onLoad = function(success) {
if (success) {
_root.mc_index.titel.text = this.titel;
_root.mc_index.subtitel.text = this.subtitel;
_root.mc_index.maintext.text = this.maintext;
}
};
id = 2
_root.textload = "textfile.txt"
this.onRelease = function() {
titel = ("titel"+(id));
subtitel = ("subtitel"+(id));
maintext = ("maintext"+(id));
_root.mc_index.thisText = new LoadVars();
_root.mc_index.thisText.editable = false;
_root.mc_index.thisText.load(_root.textload);
_root.mc_index.thisText.onLoad = function(success) {
if (success) {
_root.mc_index.titel.text = this.titel;
_root.mc_index.subtitel.text = this.subtitel;
_root.mc_index.maintext.text = this.maintext;
}
};