PDA

View Full Version : Manipulating DropDown Data help


ninjapheret
08-13-2004, 05:19 PM
Hi there,

I've got a dropdown menu with a list of about a hundred items. I want to write a clean line of AS to get the current value of my dropdown (nameBox) item to appear in a dynamic textbox. Does anyone know how to do this?

And where do I place the code? If I place it on the box, I get no list of items in the box when I preview the movie. If I place it on Frame1, the dropdown is distorted.

My current code is...

stop();
function dropdown_check() {
if (nameBox.getValue() == 1) {
inscription.text = (nameBox.getValue() == 1)
} else {
etc, etc,
}
}
setInterval(dropdown_check, 10);

So I have it checking the box every 10 milliseconds, which is fine, in case they change their choice. But the code at top doesn't work right. How do I get it to "get current value" always, and not have to type in static output?? I know there's got to be a way to have it store current data in a var and then display the var to "inscription.text", thus making things very easy for me, since I have a load of copy to put into the Data for the hundreds of choices they have...

can anyone help?

Edit: okay, i realize that in my code i put "test" inscription.text to data instead of "set" inscription.text to data, but that's not the point now..