View Full Version : Combo box
I want to know what properties of the combo box in flash mx that return the name of the combo box?
I have 2 combo box on a page and I need to know which one the user picked.
Thanks
i think _name will return the instance name of the object. if you haven't supplied an instance name, then you get nothing in return.
I don't think it works:(
This is my code
function showalbum () {
getURL(_name.getSelectedItem().data,"_blank");
}
Is there something wrong with my code?
Thanks
i think i missunderstood your question.
if you were to put this code on the first frame of your program, it will return the return all of the instance names within the scope of this for in loop:
for(x in _root){
trace(_root[x]._name);
}
in the case of your combo box i believe you need to assign an instance name to the combobox (in the properties panel). then in your code use the instance name you gave it.
getURL(mycomboboxInstance.getSelected......
Ok, i'm still confused how to use that in my function.
iF you want you can check my website first so you know what is my problem.
it's www.andrewkurniadi.com, and then go to my pictures
there will be 2 combo box
and usually i use two dofferent function for 2 different combo box
function showusa () {
getURL(usa.getSelectedItem().data,"_blank");
}
and
function showother () {
getURL(other.getSelectedItem().data,"_blank");
}
but now i want to use one function to handle both combobox.
Can you help me with it? Thanks
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.