Hello all. I am having a big time trouble with what should be a simple thing. I am making a Flash movie that will produce sales proposals with the secretary only having to update a .txt file and publish. Everything else is working fine except for product descriptions. I have two external txt files that are loaded successfully, one with client info (text1) and one with descriptive paragraphs (text2). These paragraphs are named P1, P2, P3, etc. This is done by using a blank mc off the stage with the following script:
onClipEvent(enterFrame) {
loadVariables(“text1.txt”,_root);
loadVariables(“text2.txt”,_root);
}
I then use the following code to take a variable P and use the value of a variable in text1 to determine which paragraph to use. text1 is set to equal a 3 in the text file in this example.
p=0;
verbage1=eval(“p”+text1);
trace(verbage1);
verbage1 is then sent to a dynamic text box for display. All of this works great…on the main timeline. I need to have all of this inside a movie clip. When I put all of this inside a mclip, verbage keeps coming back undefined. I have made one change to my script calling the txt files:
onClipEvent(enterFrame) {
loadVariables(“text1.txt”,_parent);
loadVariables(“text2.txt”,_parent);
}
The varialbes load in fine and work individually great in the dynamic text box. But the verbage1 always is undefined. And if I ask it to trace(text1) is says undefined, but if set the dynamic text box to text1 it returns 3. How can it be undefined but still output right? Any ideas?