I'm using Actionscript 3 and Scaleform 4.1 to command an instance of a TileList in a Flash project (CS 5.5).
I have got the TileList populating with ListItemRenderer objects (basically buttons).
In my current situation, I need rows of 4, but I need to place 15 buttons (design requirement). The TileList automatically populates the final row with 3 buttons, and one Disabled state button (instead of a blank space).
So the question:
Alternate solutions also welcome, i.e. can you add another state to the ListItemRenderer such as "blank"? If so, how would you force TileList to default to that instead of Disabled?
If there is good documentation available on this, I don't mind an RTFM reply with a link, but I haven't found anything after a couple days scrounging. Thanks!
It is certainly possible to extend or modify the TileList to suit your needs. That is why we've released CLIK's source. But to answer your question, by Default, the Tilelist is set up to use a blank/disabled renderer for empty tiles.
You can handle this without extending the tilelist, but instead the item renderer itself (much more common anyway for displaying your custom data). The 'disabled' renderer's will all get setdata(null) called on them. Thus just override setdata to toggle the visibility when that is the case:
if ( data != null )
{
//do stuff with data
visible = true;
}
else
{
visible = false;
}