Announcement

Collapse
No announcement yet.

List item index

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    List item index

    SOLVED

    Hi!

    I have a new question for you. How could I get the index of an item which belongs to a scrolling list through the ITEM_CLICK event?

    Thank you in advance!

    Regards!

    #2
    Code:
    YourList.GetInt("selectedIndex")

    Comment


      #3
      That is for UnrealScript and I need to get the index in AS3. Anyway, the selectedIndex property returns the index of the current selected item and not the index of the clicked item.

      Comment


        #4
        In AS3:

        Code:
        scrollingList.addEventListener( ListEvent.ITEM_CLICK, onItemClicked);
        
        function onItemClicked(e:ListEvent):void {
        	trace( e.index );
        }

        Comment


          #5
          I have tried it and it seems to work.

          Thank you very much, Matt!

          SOLVED!

          Comment

          Working...
          X