waffe
October 21, 2002, 11:30pm
1
The line of code below looks at the data list of a listbox.
How can I have the getValue command look at the label list of a listbox
What the code does
if (combobox.getValue() == “data”)
What I would like it to do
if (combobox.getValue() == “label”)
system
October 21, 2002, 11:56pm
2
Set your data to the same as your labels.
system
October 22, 2002, 12:03am
3
Nice try but this will not work for me because I am trying not to use the data list at all.:cowboy:
system
October 22, 2002, 12:15am
4
Any particular reason for that?
It’s how this component works, it’s s’posed to make your life easier by just filling in the labels and data, not making it harder…
system
October 22, 2002, 7:17pm
5
onChange = function ()
{ if (combobox.getValue() == “label”)
{screen.loadSound(getValue() == “data”, true);}
Ok I know this is not correct code, but it is the idea I am showing.
label= what you see in the listbox.
Data= the url of the mp3.
system
October 22, 2002, 9:03pm
6
Wrong syntax: it’s
combobox.getItemSelected().label;
combobox.getItemSelected().data;