Hey
I have a easy dummie code were I have a vertical scroll and i’m trying to change it to horizontal
but I fail everytime I try to fix it and i kinda need some help here!
I have attach a .fla file so you can see it.
The as code is:
btnSlider.onPress = function() {
left = mcSliderBar._x;
right = mcSliderBar._x
top = mcSliderBar._y;
bottom = mcSliderBar._y + mcSliderBar._height - btnSlider._height
startDrag(this, false, left, top, right, bottom)
Mouse.addListener(mouseListener);
}
btnSlider.onRelease = btnSlider.onReleaseOutside = function() {
stopDrag();
Mouse.removeListener(mouseListener);
}
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
HowFarCanSliderMove = mcSliderBar._height - btnSlider._height
HowFarMustContentsMove = mcContents._height - mcScrollWindow._height
HowMustFasterMustContentMove = HowFarMustContentsMove/HowFarCanSliderMove
HowFarIsSliderDownBar = btnSlider._y - mcSliderBar._y
HowFarToMoveContents = HowFarIsSliderDownBar * HowMustFasterMustContentMove
mcContents._y = mcScrollWindow._y - HowFarToMoveContents
};