Skip to main content
Known Participant
August 4, 2006
Answered

add variable to a variable..?

  • August 4, 2006
  • 2 replies
  • 310 views
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;
}
};
This topic has been closed for replies.
Correct answer kglad
try:

2 replies

kglad
Community Expert
Community Expert
August 4, 2006
you're welcome.
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
August 4, 2006
try:

vinnioAuthor
Known Participant
August 4, 2006
A lot of thanks it is working!!!