Components-ComboBox

What is wrong with this code…
I am using combobox but when I change selection it does not chnage to degree=5 or 6 or 7, which means my var direction does not change to southwest.

function getResults() {
degree = combo_box.getSelectedItem().data;
selectedItem = combo_box.getSelectedIndex();
if (degree=1 or 2 or 3) {
direction = “south”;
} else if (degree=5 or 6 or 7) {
direction = “southwest”;
}
}

Help!

Here’s my version. If you need the quick fla, let me know here, and I will attach.

please note that I am using combo_box.getvalue() instead of combo_box.getSeletectedItem().data

also, I used >= <= instead of what you used

finally, my function name happens to be OnChange, but it can be anything you want to call it.


function onChange(combo_box) { 
degree = combo_box.getvalue(); 
if (degree<=4) { 
direction = "south"; 
} else if (degree>=5) { 
direction = "southwest"; 
} 
} 

good luck!