Previously, I used flex components for development. I used flash components today. The default style does not satisfy me.
Especially when the text in the text is smaller than 12px, It is very vague and unclear.
Therefore, you need to modify the style of the flash component.
Package
{
Import flash. display. Sprite;
Import fl. controls. TileList;
Import fl. controls. ScrollBarDirection;
Import flash. text. TextFormat;
Public class TileListDemo extends Sprite
{
Private var tlc: TileList;
Public function TileListDemo ()
{
// Create TileList instance
Var tlc: TileList = new TileList ();
// Create TextFormat object to style labels
Var tf: TextFormat = new TextFormat ();
Tf. font = "Verdana ";
Tf. bold = true;
Tf. color = 0xFF6666;
Tf. size = 14;
// Add content to the TileList
Tlc. addItem ({label: "Image 1", source: "http://manewc.com/projects/flash/TileList/1.jpg "});
Tlc. addItem ({label: "Image 2", source: "http://manewc.com/projects/flash/TileList/2.jpg "});
Tlc. addItem ({label: "Image 3", source: "http://manewc.com/projects/flash/TileList/3.jpg "});
Tlc. addItem ({label: "Image 4", source: "http://manewc.com/projects/flash/TileList/4.jpg "});
Tlc. addItem ({label: "Image 5", source: "http://manewc.com/projects/flash/TileList/5.jpg "});
Tlc. addItem ({label: "Image 6", source: "http://manewc.com/projects/flash/TileList/6.jpg "});
// Set column and row values
. ColumnWidth = 500;
Tlc. rowHeight = 300;
Tlc. columnCount = 1;
Tlc. rowCount = 1;
Tlc. height = 320;
Tlc. width = 500;
// Enable scrolling
Tlc. scrollPolicy = "on ";
// Position
Tlc. move (stage. stageWidth/2-tlc. width/2, stage. stageHeight/2-tlc. height/2 );
// Add to the display
AddChild (tlc );
// Set style for labels
Tlc. setRendererStyle ("textFormat", tf );
Tlc. setRendererStyle ("imagePadding", 5 );
}
}
}