اسکرول افقی as2

pedram2030

New Member
کسی میتونه کمکی بکنه واسه اسکرول افقی برای یک موی کلیپ
سورس یا راهنمایی
ممنون میشم

این کدم گیر آوردم اصلن سر در نمیارم

[PHPS]

fscommand("allowscale", "false");
bar3.useHandCursor = dragger3.useHandCursor=TRUE ;
space = 100;
friction = 0.9;
speed = 4;
x = dragger3._x;
left = main2._x;
right = main2._x+mask2_mc._width-main2._width-space;
dragger3.onPress = function() {
drag = true;
this.startDrag(false, this._parent.x, this._y, this._parent.x+this._parent.bar3._width-this._width, this._y);
dragger3.scrollEase();
};
dragger3.onMouseUp = function() {
this.stopDrag();
drag = false;
};
moveDragger = function (d) {
if ((dragger3._x>=x+bar3._width-dragger3._width && d == 1) || (dragger3._x<=x && d == -1)) {
clearInterval(myInterval);
} else {
dragger3._x += d;
dragger3.scrollEase();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._x-x)/(bar3._width-this._width);
dy = Math.round((((left-(left-right)*r)-main2._x)/speed)*friction);
main2._x += dy;
};
};




[/PHPS]
 

جدیدترین ارسال ها

بالا