1 Reply Latest reply on Oct 3, 2006 3:03 PM by Justin Levi

    Problem: Saving TileList Element Position after Drag Drop Reordering

    Justin Levi
      I have a TileList populated with a an array of images and using the
      default behavior of the allowDragSelection, dragEnabled, dropEnabled,
      dragMoveEnabled properties, the user can rearrange the list as needed.

      What I'm having a problem with is accessing the new order or position of each item in the list after the
      user has rearranged the images. The tileList's dataProvider
      arrayCollection seems to push another position onto the array as a
      temporary place holder while creating the new order. However, the new
      order of the dataProvider does not seem to directly correspond to the
      order displayed in the TileList.

      How can I access the new order of the displayed tilelist
      after the user rearranges the list?

      Here is what the arrayCollection looks like when the application first
      starts:

      this.myArrayCollection = Array (@2998af1)
      [0] = Object (@26cff01)
      file_name = "1159664036.jpg"
      id = "1"
      [1] = Object (@295ffa1)
      file_name = "11596647771.jpg"
      id = "33"
      [2] = Object (@295ffe1)
      file_name = "11596647772.jpg"
      id = "34"

      Here is what the arrayCollection looks like after the user drags the
      first image to the right of the second image.

      this.myArrayCollection = Array (@2998af1)
      [0] = Object (@295ffa1)
      file_name = "11596647771.jpg"
      id = "33"
      [1] = Object (@26cff01)
      file_name = "1159664036.jpg"
      id = "1"
      [2] = Object (@26cff01)
      file_name = "1159664036.jpg"
      id = "1"
      [3] = Object (@295ffe1)
      file_name = "11596647772.jpg"
      id = "34"