
01.07.2004, 20:42
|
|
Регистрация: Jan 2004
Адрес: На чердаке.
Сообщений: 1,112
|
Блин, сорри, это несколько не то.
Вот:
BY1 = up_mc._y+up_mc._height;
BY2 = down_mc._y-beg_mc._height;
BX = up_mc._x;
up_mc.onPress = function() {
this.onEnterFrame = function() {
this._parent.beg_mc._y -= 2;
txt.scroll = Math.floor((this._parent.beg_mc._y-BY1)*(txt.maxscroll)/100);
if (this._parent.beg_mc._y<=BY1) {
delete this.onEnterFrame;
}
};
};
up_mc.onRelease = up_mc.onReleaseOutside=function () {
delete this.onEnterFrame;
};
down_mc.onPress = function() {
this.onEnterFrame = function() {
this._parent.beg_mc._y += 2;
txt.scroll = Math.floor((this._parent.beg_mc._y-BY1)*(txt.maxscroll)/100);
if (this._parent.beg_mc._y>=BY2) {
delete this.onEnterFrame;
}
};
};
down_mc.onRelease = down_mc.onReleaseOutside=function () {
delete this.onEnterFrame;
};
beg_mc.onPress = function() {
this.startDrag(false, BX, BY1, BX, BY2);
this.onEnterFrame = function() {
txt.scroll = Math.floor((this._y-BY1)*(txt.maxscroll)/100);
};
};
beg_mc.onRelease = function() {
this.stopDrag();
delete this.onEnterFrame;
};
|