我将使用 HSlider 来设置一系列值。我希望左拇指看起来像(而右拇指看起来像),所以它们似乎包含范围(范围)而不是|range| . 我只知道如何为 SliderThumb 设置皮肤,这将为两者设置皮肤。有谁知道为每个拇指设置不同皮肤的方法?
谢谢。
更新
我现在有这个代码:
<?xml version="1.0" encoding="utf-8"?>
<mx:HSlider xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Style>
.thumbTickLeft
{
disabledSkin: Embed(source="skins.swf", symbol="thumbTickLeft_disabledSkin");
downSkin: Embed(source="skins.swf", symbol="thumbTickLeft_downSkin");
overSkin: Embed(source="skins.swf", symbol="thumbTickLeft_overSkin");
upSkin: Embed(source="skins.swf", symbol="thumbTickLeft_upSkin");
}
.thumbTickRight
{
disabledSkin: Embed(source="skins.swf", symbol="thumbTickRight_disabledSkin");
downSkin: Embed(source="skins.swf", symbol="thumbTickRight_downSkin");
overSkin: Embed(source="skins.swf", symbol="thumbTickRight_overSkin");
upSkin: Embed(source="skins.swf", symbol="thumbTickRight_upSkin");
}
</mx:Style>
<mx:Script>
<![CDATA[
override protected function commitProperties():void
{
super.commitProperties();
updateThumbSkins();
}
private function updateThumbSkins():void
{
this.getThumbAt(0).setStyle('styleName','thumbTickLeft');
this.getThumbAt(1).setStyle('styleName','thumbTickRight');
}
]]>
</mx:Script>
</mx:HSlider>
拇指滴答声根本不显示?顺便说一句,我确保皮肤正确加载,因为我可以将它们设置为这样的按钮:
<mx:Button styleName="thumbTickRight"/>