仅供参考哦
layout="vertical" creationComplete="init()">
import mx.collections.ArrayCollection
public var arr:Array = [
{key:'1', value:'value1'}
,{key:'2', value:'value2'}
]
public var arrAdd:Array = [
{key:'1', value:'value1'}
,{key:'2', value:'value2'}
,{key:'3', value:'value3'}
,{key:'4', value:'value4'}
]
[Bindable]
public var arrC:ArrayCollection
public function init():void{
arrC = new ArrayCollection(arr)
}
public function changeAdd():void{
arrC = new ArrayCollection(arrAdd)
}
public function changeDel():void{
arrC = new ArrayCollection(arr)
}
]]>
100%" width="100%" fontFamily="Arial" layout="absolute">
你用的是mx里的Button还是Spark里的Button? mx里的可以设置各种状态的皮肤样式, upSkin downSkin.Spark的Button最好是写个Skin类来设置skinClass,在Skin类里使用图片.
flexlib 里面有一个设置个性化按钮的东西,具体可以查看gougle 的api,我写过一个你可以参考下,前提是你必须使用flexlibButton {
upSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
overSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
downSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
disabledSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
selectedUpSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
selectedOverSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
selectedDownSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
selectedDisabledSkin:ClassReference('flexlib.skins.EnhancedButtonSkin')
corner-Radii: 6, 6, 6, 6
border-Colors: #B2DC32, #4b5f0c
over-Border-Colors: #B2DC32, #4b5f0c
selected-Border-Colors: #B2DC32, #4b5f0c
border-Thickness: 1
border-Alpha: 0.95
fill-Colors: #B2DC32, #4b5f0c
fill-Color-Ratios: 0, 255
over-Fill-Colors: #B2DC32, #4b5f0c
over-Fill-ColorRatios: 0, 128, 255
selected-Fill-Colors: #B2DC32, #4b5f0c
selected-Fill-Color-Ratios: 0, 255
color: black
text-Roll-Over-Color: #4b5f0c
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)