Показать сообщение отдельно
Старый 01.07.2004, 20:27
Ромастый вне форума Посмотреть профиль Отправить личное сообщение для Ромастый Найти все сообщения от Ромастый
  № 2  
Ромастый
 
Аватар для Ромастый

Регистрация: Jan 2004
Адрес: На чердаке.
Сообщений: 1,112
BY1 = up_mc._y+up_mc._height;
BY2 = down_mc._y-beg_mc._height;
BX = up_mc._x;
NY = news_mc._y;
H = 130;
//âûñîòà âèäèìîé îáëàñòè
beg_mc.onPress = function() {
this.startDrag(false, BX, BY1, BX, BY2);
this.onEnterFrame = function() {
news_mc.scrolling();
};
};
beg_mc.onRelease = beg_mc.onReleaseOutside=function () {
this.stopDrag();
delete this.onEnterFrame;
};
up_mc.onPress=function() {
this.onEnterFrame=function() {
this._parent.beg_mc._y-=2;
this._parent.news_mc.scrolling();
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;
this._parent.news_mc.scrolling();
if(this._parent.beg_mc._y>=BY2) {
delete this.onEnterFrame;
}
}
}
down_mc.onRelease=down_mc.onReleaseOutside=function() {
delete this.onEnterFrame;

}
news_mc.scrolling = function() {
this._y = -(this._parent.beg_mc._y-BY1)*(this._height-H)/(BY2-BY1)+NY;
};

Если хошь, могу полный исходник сбросить