When you say that the glossery will expand a great deal, how big are you talking ?
Keep in mind that you shouldn't have more than 400 (300 even) items combined in all boxes in one frame at any given time.
Where are you wanting to search the XML ? Inside flash (loading entire XML file, then searching), or pass the selection to an ASP, PHP, ect.. script that will search & return the results ?
If this file will contain a huge amount of entries you may want to do the latter.
If your looking to search the XML within flash then you need to pass the selectedItems .label or .data to your search function (or have the function grab it itself)
Example, (assuming XML is loaded & glossery has been assigned to labels of listBox)
/* lookIn is an array holding info parsed from XML */
on(release){
resultHTML = ""; //declare & zero build string for textBox
toFind = myListBox_lb.getSelectedItem().label; //or .data for data associated with item
for(i=0; i < lookIn.length; i++){
if(lookIn[i].indexOf(toFind) != -1){
resultHTML += ("<b>Match</b> " + i + "<br>" + lookIn[i] + "<br>");
}
resultTextBox.htmlText = resultHTML;
delete resultHTML;
}
- /* lookIn is an array holding info parsed from XML */
- on(release){
- resultHTML = ""; //declare & zero build string for textBox
- toFind = myListBox_lb.getSelectedItem().label; //or .data for data associated with item
- for(i=0; i < lookIn.length; i++){
- if(lookIn[i].indexOf(toFind) != -1){
- resultHTML += ("<b>Match</b> " + i + "<br>" + lookIn[i] + "<br>");
- }
- resultTextBox.htmlText = resultHTML;
- delete resultHTML;
- }
This is a generic example assuming a simple list of items to search through, then display results in a HTML enabled dynamic textBox.
Strong with this one, the sudo is.