views:

162

answers:

0

Hi all -

I have a Flash Tilelist component (not flex) and have set it up so that 4 rows of 3 tiles each are visible before scrolling. I should note that I'm using a horizontal layout because I need a horizontal scrollbar. I realize using a vertical layout would sort the way I want but gives a vertical scrollbar.

The problem I'm encountering is that when adding the items, the Tilelist adds them in full rows first, so my items are not visually sorted the way I would like. I don't think I can change this in the tilelist component so I'm looking for some code to re-sort by data collection before adding so that the sort is 'page' based.

For example here is what the tilelist does currently with 25 items:

|01|02|03| 04|05|06| 07|
|08|09|10| 11|12|13| 14|
|15|16|17| 18|19|20| 21|
|22|23|24| 25|

And I am trying to generate this:

|01|02|03| 13|14|15| 25|
|04|05|06| 16|17|18|
|07|08|09| 19|20|21|
|10|11|12| 22|23|24|

Is this possible? I was trying to figure out some modulus based math to perform when adding the items but have not had any luck.

Thanks in advance for any assistance!

b