看了一篇英文的教程,感慨颇多,list 组件默认有list 选择样式,在list的选择上,它的构造函数里面定义了一个drawSelectionIndicator 方法
protected function drawSelectionIndicator ( indicator:Sprite, x: Number, y: Number, width: Number, height: Number, color:uint, itemRenderer:IListItemRenderer ): void { var g:Graphics = Sprite (indicator ). graphics; g. clear ( ); g. beginFill ( color ); g. drawRect ( 0, 0, width, height ); g. endFill ( ); indicator. x = x; indicator. y = y; } 我们只要把这个方法覆盖掉就可以了 import flash. display. Sprite; import mx. controls. TileList; import mx. controls. listClasses. IListItemRenderer; public class TileListEx extends TileList { override protected function drawSelectionIndicator ( indicator:Sprite, x: Number, y: Number, width: Number, height: Number, color:uint, itemRenderer:IListItemRenderer ): void { return; } } 或者修改成自己的样式