Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox questions re: font and default values (newbie)

Status
Not open for further replies.

kellstee

Technical User
Dec 31, 2005
37
US
I have a very simple Flash tool that was written over a year ago (not by me). I want to make two simple changes to it, but I have no idea what I'm doing.

When the tool loads, I have 5 input fields (one text field and 4 comboboxes). How do I set default values for these fields? For example, I want the 5th drop-down item selected for all 4 comboboxes when the flash tool is loaded.

I think I found a piece of code that does this but I just have no idea where to put the code:
font_cb.selectedindex = 5;

Also, the font for the combobox choices and text field is in Arial and I want it to be in Georgia. How would I do this?

Thanks in advance!
Kelly
 
If you have your ComboBox instance "font_cb" on the main timeline, place this in the main timeline:
[tt]
font_cb.selectedIndex = 4;
font_cb.setStyle("fontFamily", "Georgia");
[/tt]
(5th item's index is 4.)

Kenneth Kawamoto
 
Thanks so much! That cleared up all of my issues.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top