PDA

View Full Version : ComboBox Change Handler Code??


ninjapheret
08-27-2004, 06:33 PM
Hi. I've got a flash prog i'm working on rite now, which allows a user to find their name from a dropdown list. When they find their name, the data from that value should be displayed in a small text window to the lower left of the dropdown.

I've been all over these forums, and sadly have been unable to fix the problem.

Heres the fla:

http://www.petrafineart.com/presentation/donors.fla

If ANYone here is able to help me get this a little further, I would be immensely grateful. Any ideas why this isn't working?

Thanks a lot in advance,

Charlie

tg
08-27-2004, 08:07 PM
well, your code has a couple of major problems....
with combo boxs, you want to use the setChangeHandler() method, or just type the function name into the changeHandler property in the property panel.

so here is what you do:
1. delete the code out of the changeHandler box in the property panel.... leave it blank.
2. all the code on the first frame of your main timeline with this code:

change=function(myObj){
// trace(myObj.getSelectedItem().data);
inscription.inscription.htmlText=myObj.getSelected Item().data;
};
nameBox.setChangeHandler("change");


3. you had a problem with the path to your text box. the text box was inside of a movieclip, so your path name needs to be: mc_name.textField_name.text (or htmlText) in this case.

4. don't know what the textformat object is set up for, your not using it anywhere.

ninjapheret
08-27-2004, 09:17 PM
Tg,

I am crying with tears of joy.

What can I do for you? I'm a graphic designer, if you need anything.

tg
08-30-2004, 03:32 PM
I'm a graphic designer, if you need anything.


well, i'm sure not. so maybe i'll be in touch with you some day.