List box trouble

OK,

I’m getting closes…but still…no cigar.

I have been able to load list box with data from an array. I have been able to write the code to change to the corresponding scene when you click on the line in the list box. But here is where it gets weird.

The first time you click on a label in the list box, it goes to the correct scene (click on “Scene 3” in the list box, and the movie advances to Scene 3, frame 1). The weirdness occurs the next time you click on any line. It seems to be storing the index and then just adding the value of that line to the stored value…then advancing to that scene (the combined number value). Make sense?

Here is my code:

---------<scene 1>---------------

scInfo = new Array();
scInfo[0] = {label: “Scene 1”, data:“Scene 1”};
scInfo[1] = {label: “Scene 2”, data:“Scene 2”};
scInfo[2] = {label: “Scene 3”, data:“Scene 3”};
scInfo[3] = {label: “Scene 4”, data:“Scene 4”};
scInfo[4] = {label: “Scene 5”, data:“Scene 5”};
scInfo[5] = {label: “Scene 6”, data:“Scene 6”};
scInfo[6] = {label: “Scene 7”, data:“Scene 7”};
scInfo[7] = {label: “Scene 8”, data:“Scene 8”};
scInfo[8] = {label: “Scene 9”, data:“Scene 9”};
scInfo[9] = {label: “Scene 10”, data:“Scene 10”};
scInfo[10] = {label: “Scene 11”, data:“Scene 11”};

function advanceScene() {
gotoAndPlay(SlideSelector.getSelectedItem().label);
}

SlideSelector.setEditable(false);
SlideSelector.setDataProvider(scInfo);
SlideSelector.setChangeHandler(“advanceScene”);

--------------< each subsequent scene’s code>--------------

function advanceScene() {
gotoAndPlay(SlideSelector.getSelectedItem().label);
}

SlideSelector.setEditable(false);
SlideSelector.setDataProvider(scInfo);
SlideSelector.setChangeHandler(“advanceScene”);

so what happens is you click on “Scene 2” in the list box, and the fist time it goes to “Scene 2”. the next time you click on it, it goes to “Scene 3”…click again and it goes to …you guessed it…“Scene 4”. The same happens for each of the other lines. You click on “Scene 3” and the first time…scene 3. Again, and it goes to scene 5. Again, and it advances to scene 7. With “Scene 4”, the fist time goes to scene 4, the next click brings you to scene 7, then to scene 10. See the pattern? it is adding the scene number plus the array position: scene 4 resided in position 3 within the array, so it takes the scene number, adds the position number and then advances to scene 7. click it again and it adds the position number again and advanced to scene 10.

Where is this information being stored, and how can it be flushed prior to the function call so it will just do the straight value, not a combined value.

I know it is a simple fix, but I’m just not seeing it. any ideas?

Ev