2 Replies Latest reply on Feb 9, 2010 11:32 PM by ramell2

    Tile List limits

    ramell2 Level 1

      I have a TileList with drag feature on.  I can drag images into another TileList I have on the page.  I want to set a limit on the number of images that the user can drag to the second TileList.  Should i write a actionscript function that once the number limit is reach it stops the drag function?  Or is there a method in the TileList class  I can use?

        • 1. Re: Tile List limits
          archemedia Level 4

          First of all, add an event listener to your second (drop) list for the dragDrop event:


          <mx:TileList dataProvider="{dp1}" dragEnabled="true"/>

          <mx:TileList dataProvider="{dp2}" dropEnabled="true" dragDrop="checkDrop(event)"/>


          Then, in the checkDrop function, call the preventDefault function to stop the drop completing:


          private function checkDrop(evt:DragEvent):void
                    if (dp2.length >= 3)


          Hope this helps



          • 2. Re: Tile List limits
            ramell2 Level 1

            Thank you so much archemedia. This was what I thought I needed to do..