2 Replies Latest reply on Aug 3, 2010 11:52 PM by Mainmanian

    dragging and dropping an item within horizontalList does not display correctly


      It appears that when I drag an item from a HorizontalList to another location within the same HorizonList, it does not display the images correctly. In my HorizontalList, I have an itemRenderer that shows the thumbnail image of the item.  I have about half a dozen items in the list and when I drag the sixth item and move to the beginning of the list, the display looks as if the first and the sixth element are switched, while in reality the resulting dataProvider array seems to have the right order, meaning the sixth element became the first element and the first element became the second element and so on. Has any one seen such a behavior and how do I rectify this? Thanks in advance. Cheers, Ramesh


      The HorizontalList def is


      <mx:HorizontalList id="myList" width="92%" height="100%" columnWidth="90" rowHeight="105" rollOverColor="#f26722"
                          itemRenderer="com.myListRenderer" labelField="name" dataProvider="{arr}" columnCount="10"
                          click="updateView(event)" dragEnabled="true" dropEnabled="true" dragMoveEnabled="true" >


      The renderer code is


      <?xml version="1.0" encoding="utf-8"?>
      <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off" verticalScrollPolicy="off" horizontalAlign="center"
              verticalAlign="middle" width="90" height="90" verticalGap="0" creationComplete="init()" >
              private function init():void {
                  imageFile.source = data.url;
                  imageName.text = data.name;
          <mx:Image id="imageFile" scaleContent="true" width="90" height="70" horizontalAlign="center" verticalAlign="middle"/>
          <mx:Label id="imageName" height="18" width="90" textAlign="left"/>