开发者

Flash Slider misses numbers between 1 and 360.... why?

开发者 https://www.devze.com 2023-03-01 02:27 出处:网络
I\'ve got the code bel开发者_如何学Pythonow, but for some reason the Flash slider doesn\'t allow me to slide to some values (it\'s set between 1 and 360).

I've got the code bel开发者_如何学Pythonow, but for some reason the Flash slider doesn't allow me to slide to some values (it's set between 1 and 360).

It goes something like 1, 3, 5, 6, 8, 10. The snapInterval is set to 1.

UIBox.addChild(speedSlider);

speedSlider.minimum = 1;
speedSlider.maximum = 360;
speedSlider.snapInterval = 1;
speedSlider.tickInterval = 45;
speedSlider.setSize(200, 50);
speedSlider.value = 13;
speedSlider.move(20, 80);
speedSlider.addEventListener(SliderEvent.THUMB_DRAG, updateSpeed);

Is there any way round this thing?


It appears that your width is set to 200 pixels:

speedSlider.setSize(200, 50);

You've also set the max value to be 360 — how can 360 different values be expressed using only 200 pixels? That's impossible, so some values will be non-selectable.

0

精彩评论

暂无评论...
验证码 换一张
取 消