I have a comboBox with several topic labels to choose from. The topics are listed in a txt file. This works. The data is also in a text file.
&Topics=topic 1,topic2, topic3 etc&
&Introduction=introduction1,introduction2,introduction3 etc&
&introduction1=a bunch of text about intro 1&
&introduction2=a bunch of text about intro 1&
etc.
In the code below, the idea is that the getValue is also a variable in the txt file
stop();
myData = new LoadVars();
myData.onLoad = function(){
var ComboTopics = myData.Topics.split(",");
var ComboIntros = myData.Intros.split(",");
CBOLoadTopics.addItem("-- Choose Topic --");
for (i=0;i<myData.Rows;i++){
CBOLoadTopics.addItem(ComboTopics*,ComboIntros*);
CBOLoadTopics.setRowCount(myData.Rows);
CBOLoadTopics.setSize(150)
trace(myData.Rows);
}
};
myData.load("topic.txt");
function loadTopics_check() {
choice = CBOLoadTopics.getValue();
trace(choice);
Introduction_txt.text = myData.choice
}
// Check the status of the dropdown every 10 miliseconds.
setInterval(loadTopics_check, 100);