[MX04] Loading Text From File Using Listbox And Textara
Hello, I am making a website in flash and I have successfully loaded the about me page into a textarea and now I would like to be able to have it changed by clicking on an item in a listbox. Here is a function that I am working with:
Code:
function selPage()
{
//to get the item data
thisText = new LoadVars();
thisText.load("pages.txt");
thisText.onLoad = function(success) {
if (success) {
thePage.text = thisText + navBox.getSelectedItem().data;
}
}
}
See that thisText + naveBox... ect.. ?
That is where my problem is. I need it to load thisText.whatever. Here is how my pages.txt is setup:
Quote:
]
&webDesign=<span class="maintext">Web Design</span><br>
<span class="subtext"><br><br>Websites...</span>
&myFlash=<span class="maintext">Web Design</span><br>
<span class="subtext"><br><br>Flash...</span>
My listbox (navBox) has values and then the data would be "webDesign" and "myFlash"
So I want thePage to equal thisText.navBox.getSelectedItem().data; I cannot do it like that, so how would I?
Thanks