Hi there
Im working on a listbox(flash component), where upon click, will display other arrays in a movie( which is also a listbox made from textfield). The second listbox suppose to contain html links, where it will open up a popup upon clicked.
The problem is that whenever i click on the listbox, the content in the sub listbox doesn't change. that is, it doesnt empty the previous load of links, but just add on to the list of links.
Im not sure what i can use to prevent this issue. I have tried listener, and "if else" statements.. Im not sure what else can be done to prevent this.
I've include the codes for the 2nd listbox(the textfield listbox) Hope that helps better in the understanding of my queston.
Really appreciate any help. Thanks.
var ListListen:Object = new Object();
ListListen.change = function(pEvent:Object) {
var selectItem:Object = pEvent.target.selectedItem;
var b :Object = pEvent.target.selectedIndex;
sampleList =_root.sampleMovie.Slist
sampleList._visible = false;
for (j=0; j<total; j++) {
if (fTitle[b]== sampleTitle[j]) {
sampleList._visible = true;
sampleList.htmlText += "<A HREF='javascript:openNewWindow(" + sampleLinks[j] + ",myFlash,width=640,height=480,toolbar=no,resizable =no)' target = '_blank'> " + sampleWorks[j]+ "</a><br>"
sampleList.dataProvider = selectItem.data;
}
}
};