I want to use the combobox function that MX has, but how do script it?
The one that I’ve got from the help site is quite vague(I guess that is why I spent more time in flashkit and kirupa more than Macromedia site, even the help-forum is not that user friendly{personal commnets}), that is
function onChange(component){
if (componet._name==“check1”){
listBox1_mc.setEnabled(componet.getValue());{
else_if (componet._name==“check2”){
listBox2_mc.setEnabled(componet.getValue());}
}
I would understand that this could be a lenghty subject, maybe somebody could guide me to a place that I could get a tutorial?
How to code it so that I can use ComboBox? Whats the use of Flash UI components if I cannot even find the correct code to use it? Macromedia site only give gibberish that I do not know which is the code and which is the variables.
ilyaslamasse, can you help me with the codes, I’m using comboBox.
BTW, how’s your class? Hope it does not go as you expected!(tough, I mean)
OK. Just drag a combobox on your scene, and give it the instance name birth. Then in the first FRAME of your movie, put this code :
// populate the combobox
for (i=1970;i<1990;i++) {
birth.addItem (i) ;
}
// function to display the selection
function comboDisplay (component) {
trace ( component.getSelectedItem().label );
}
// We assign the function to the combobox
birth.setChangeHandler ("comboDisplay") ;
You can also link each label (here a number) to a data, and use that data in the comboDisplay function.
I have went to more indepth and found the answer that I am looking for, apparently not that easy. The code up there is not what I want to achieve. It is this one…