10 Replies Latest reply on Feb 25, 2010 12:39 PM by cyber0897

    spark list changing selected index does not work please help

    cyber0897 Level 1

      hey guys... so im trying to change my spark list component in action script after the press of a button...


      the code i have is


      <s:List id="trouble" width="100%" height="100%" itemRenderer="modules.apx32.myComponents.listRenderer"
           borderAlpha="0" borderVisible="false" contentBackgroundColor="#e9e9e9" color="#ffffff"
           <s:XMLListCollection id="troubleShootProvider" />



      and on click of a button on that page i call the function


      public function closeSubImg():void{
           trouble.selectedIndex = 0;
           trouble.selectedIndex = previousParent;
           subImgCloseBtn.visible = false;



      as you can see im trying trouble.selectedIndex = the number.. that was previously selected... but for some reason it changes the index but does not call the change function in my list...



      any ideas??



      thanks for all your help