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

Object Fitting Keyboard Shortcuts Disfuntional

Markers not showing up after opening a saved project. Where did they go!?

Photoshop javascript: Open files in all subfolders