Skip to main content
Known Participant
May 3, 2010
Answered

Combobox and data help needed

  • May 3, 2010
  • 1 reply
  • 1099 views

How do I make the selected label and data in my combobox appear in a dynamic text box in macromedia flash 8? help me please thanks.

This topic has been closed for replies.
Correct answer Ned Murphy

This is the code I copied from your post:

_root.onEnterFrame = function() {
           
       mr.text = String(person.selectedItem.label);

   };


I'm not sure where you are with things, but for whatever version of Flash you are using, and whatever version of Actionscript your file is set to use, you should look up the ComboBox component in the help documents and go thru the propertties and methods that support it.  YOu are likely to find examples there that you can experiment with and get working for you.  That what I did before I answered your posting.

1 reply

Ned Murphy
Legend
May 3, 2010

The combo box has a selectedItem property that you can use...

yourTextField.text = String(cbName.selectItem.label) +"   "+ String(cbName.selectItem.data)

DawnsGuyAuthor
Known Participant
May 3, 2010

Thanks Ned I tried that but the text field showed "undefined" , could you please help me with the syntax?

my combobox name is "person" and the dynamic text field names "mr".

Ned Murphy
Legend
May 3, 2010

Show me what code you tried.