<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function formatFunction(item:Number):String {
//格式化函数
return "哈哈:" + item.toString();
}
]]>
</mx:Script>
<mx:Panel id="panel" title="水平滑杆控件示例"
paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10" backgroundColor="#FFFFFF" >
<!--Track (滑杆) Thumb (指针) Tick (刻度) Label (刻度读数) dataTipOffset(显示tooltip提示信息的位置) -->
<mx:HSlider width="300" trackSkin="assets.MySliderTrackSkin" sliderThumbClass="assets.MySliderThumb" borderColor="0xffffff" maximum="100" snapInterval="5" tickInterval="25" labels="[0,25,50,75,100]" value="25" dataTipOffset="-99999" liveDragging="true" dataTipFormatFunction="formatFunction"
showTrackHighlight="true"
trackHighlightSkin="@Embed('assets/hl.gif')"
thumbUpSkin="@Embed('assets/01.jpg')"
thumbOverSkin="@Embed('assets/01.jpg')"
thumbDownSkin="@Embed('assets/01.jpg')"
/>
</mx:Panel>
</mx:Application>