If you have an ArrayCollection as the dataProvider you can use Sort to do a descending sorting.
I think you may be misunderstanding my question.
say, I have a vertical tilelist that has five slots, my array has only one item, is it still possible to add that one item to the bottom slot?
I'm asking this question because I'd like to do the following:
I would like to use the dataChangeEffect animation on the tilelist. However, when an item is removed, I would like the items further up to drop down to fill the spot. (instead of the items further down to move up).
Or you can add to the bottom as follows:
<?xml version="1.0" encoding="utf-8"?>
[Bindable] private var myAC:ArrayCollection = new ArrayCollection([
<mx:Button label="Add" click="myAC.addItemAt('test', myAC.length);"/>
In fact, what I'd really like to do is this:
Use the tilelist to produce the following animation:
At the beginning, items will drop from outside of the display area onto the correct position into a vertical tile list. And whenever an item is removed, the items further up will drop down, and a new item will drop from outside of the display area onto the top of the tile list.
any ideas about how to create this kind of animation?
If that's the case then what you need to do is add a dummy empty slot before the item that you delete in order to move down the upper item, using addItemAt. Just an idea.
1 person found this helpful
Use effects with the moveEffect trigger, but dont use a TileList, use a precisely controlled Grid container.
Can you give a bit more detail? I'm not too familiar with the grid container.
Actually, you might try canvas, and have the items off screen initially using negative x and y values.