Deselect when i click the already selected item in list component


i know list.selectedindex = -1; works when use example external buttonevent listener.

 

but want click , deselect the selected item in list component , set list selectedindex=-1

 

any clues?

use:

 

var selectedindex:int;

function f(e:mouseevent):void{

    if(e.currenttarget.selectedindex==selectedindex){

        e.currenttarget.selectedindex = -1;

    } else {

        selectedindex = e.currenttarget.selectedindex;

    }

}



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?