Egret|Egret eui 学习-VSlider---

滑动选择器 Egret|Egret eui 学习-VSlider---
文章图片
滑块效果图

//2.11滑动选择器 //水平滑块 private initHslider():void{ var hslider: eui.HSlider = new eui.HSlider(); hslider.width = 200; hslider.x = 100; hslider.y = 100; hslider.maximum = 100; hslider.minimum = 0; hslider.value = https://www.it610.com/article/0; hslider.addEventListener(eui.UIEvent.CHANGE,(evt:eui.UIEvent)=>{egret.log(evt.target.value)},this); this.addChild(hslider); } //垂直滑块 private initVslider():void{ var vslider: eui.VSlider = new eui.VSlider(); vslider.height = 100; vslider.x = 200; vslider.y = 200; vslider.maximum = 100; vslider.minimum = 0; vslider.value = https://www.it610.com/article/0; vslider.addEventListener(eui.UIEvent.CHANGE,(evt:eui.UIEvent)=>{egret.log(evt.target.value)},this); this.addChild(vslider); }

    推荐阅读