mylistener=new Object();
mylistener.change=function(eventObj){
var eventSource=eventObj.target;
var theSelectedItem=eventSource.selectedItem;
var theSelectedLabel=eventSource.selectedItem.label;
if (theSelectedLabel="pos.swf"){
trace(theSelectedLabel);
// startPreload("pos.swf");
}
else if (theSelectedLabel="inv.swf"){
trace ( "You selected "+theSelectedLabel+"," + "which is not currently available.");
}
}
I have set up this list component, with the values through given through the component inspector. But when I test the movie, the code fires only on the first if condition, it does not go into the else if part at all.
I am creating a product demo from where the user can select the module he wants to see. Now what happens is that even if you selected Point of Sales (pos.swf) or Inventory (inv.swf), the code fires only the first if segment.
How can I get it working ?
TIA!