5 Replies Latest reply on Jun 21, 2007 11:41 AM by Exalto

    several same objects in a tilelist not selectable

    Exalto
      Hello.

      I have 2 horizontal lists in my application. The first one contains images and I am allowed to drag them from first one and drop in the another one. Everything seems to work perfectly in first look. I can drag images to one list to another and it copies the images a move to other one. The problem appears when I move same image for a several times (2 or more). There seems to be several items, but the problem is that I can only select the last one. I have also a numeric stepper there. When I change a value in other, value changes in another as well.

      I think problem is that the objects have same UID, but I can't figure out how to change that.

      Can you please tell me the solution to this problem. I have totally lost my nerves with this.

      Thank you!



      Here is the source:


      <mx:Script>

      <![CDATA[
      import mx.collections.ArrayCollection;

      [Bindable]
      private var valitut_kuvat:ArrayCollection=new ArrayCollection();

      <mx:Canvas label="Choose images">

      <mx:TileList dataProvider="{taustakuvalataus.lastResult.multime dia.images.img}" dropEnabled="false" allowDragSelection="false" dragEnabled="true" dragMoveEnabled="false" itemRenderer="Thumbnail" id="tilelist_kuvat" creationComplete="taustakuvalataus.send()"></mx:TileList>

      <mx:HorizontalList dropEnabled="true" dragEnabled="true" dragMoveEnabled="true" itemRenderer="Thumbnail2" dropShadowEnabled="true" id="multimedia_valitut" dataProvider="{valitut_kuvat}"></mx:HorizontalList>

      </mx:Canvas>

      -----------Thumbnail.mxml----------------------------------------------
      <?xml version="1.0"?>
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" width="80" height="65" horizontalScrollPolicy="off" verticalScrollPolicy="off" borderStyle="none">


      <mx:Image id="img" height="60" width="80" source="{data.kuva}"/>


      </mx:VBox>


      -----------Thumbnail2.mxml---------------------------------------------
      <?xml version="1.0"?>
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" width="125" horizontalScrollPolicy="off" verticalScrollPolicy="off" borderStyle="none" height="158">


      <mx:Image id="img" height="100" width="120" source="{data.kuva}"/>

      </mx:VBox>