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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListBox Component

Status
Not open for further replies.

LastCyborg

Programmer
Feb 7, 2003
256
MX
I have this component in a frame, but i cannot make reference to the index of it.
I have something like this

var selIndex = ListBoxName.getSelectedIndex ();
if (selIndex == 1) //element Index number 1
{
movieClipName.gotoAndStop (selIndex + 1);
}


it should go in the movi clip to the frame number (selIndex + 1) isn't?

or where I wrong?





---LastCyborg---
 
nothing wrong with the code as part of the change handler....all i can think of is did you remember that the index starts at 0
 
I know that I should write a function like a event on change or something like that, but could anyone tell me how?



---LastCyborg---
 
listboxname.setChangeHandler("change");
function change(){
var selIndex = ListBoxName.getSelectedIndex();
if (selIndex == 1)
{
movieClipName.gotoAndStop (selIndex + 1);
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top