Öèòàòà
var step;
var trackStart;
step = 1;
koef = 6;
currentTarget = _parent._parent._parent.ret.tex;
//////// text field
//////////////////////////// arrow up//////////////////////
b_up.onPress = function() {
step = 1;
trackStart = pos._y;
_global.interslow = setInterval(slowUp, 20);
};
b_up.onRollOver = function() {
b_up.gotoAndStop(2);
};
b_up.onRollOut = function() {
b_up.gotoAndStop(1);
};
function slowUp() {
if (pos._y>0) {
pos._y -= (1/step)*koef;
}
setProp(pos._y, currentProp, currentTarget);
//_parent._parent.box.under_mask._y = -1*((_parent._parent._parent.step)*pos._y);
if (step == 20) {
step = 1;
clearInterval(_global.interslow);
}
step++;
}
//////////////////////////// arrow down//////////////////////
b_down.onPress = function() {
step = 1;
trackStart = pos._y;
_global.interslow = setInterval(slowDown, 20);
};
b_down.onRollOver = function() {
b_down.gotoAndStop(2);
};
b_down.onRollOut = function() {
b_down.gotoAndStop(1);
};
function slowDown() {
if (pos._y<380) {
pos._y += (1/step)*koef;
}
setProp(pos._y, currentProp, currentTarget);
//_parent._parent.box.under_mask._y = -1*((_parent._parent._parent.step)*pos._y);
if (step == 20) {
step = 1;
clearInterval(_global.interslow);
}
step++;
}
function setProp(position, prop, target) {
var a = position;
var b = 380;
var c = 0;
var kt:Number = b/currentTarget.maxscroll;
var propValue = (a/kt);
target[prop] = propValue;
}
pos._y = 0;
currentProp = "scroll";
setProp(pos._y, currentProp, currentTarget);
function startSlider(active) {
statusSl = active;
var kt:Number = 520/currentTarget.maxscroll;
if (active) {
this.onMouseMove = function() {
setProp(pos._y, currentProp, currentTarget);
updateAfterEvent();
};
} else {
this.onMouseMove = null;
}
}
//////////////// //////////////// //////////////////
var mouseListener15:Object = new Object();
mouseListener15.onMouseWheel = function() {
var kt:Number = Math.round(520/currentTarget.maxscroll);
if (((currentTarget.scroll)<>(isNaN)) and (pos._y<=380)) {
//pos._y = kt*currentTarget.scroll;
}
};
mouseListener15.onMouseUp = function() {
if (String(statusSl) == "true") {
_global.interslow = setInterval(slow, 20);
}
};
mouseListener15.onMouseDown = function() {
step = 1;
clearInterval(_global.interslow);
trackStart = pos._y;
};
Mouse.addListener(mouseListener15);
/////////// sloooooow ///////////////////
function slow() {
if (((trackStart-pos._y)>0) and (pos._y>0)) {
pos._y -= (1/step)*koef;
}
if (((trackStart-pos._y)<0) and (pos._y<300)) {
pos._y += (1/step)*koef;
}
//setProp(pos._y, currentProp, currentTarget);
//_parent._parent.box.under_mask._y = -1*((_parent._parent._parent.step)*pos._y);
if (step == 20) {
step = 1;
clearInterval(_global.interslow);
}
step++;
}
var trackStart;
step = 1;
koef = 6;
currentTarget = _parent._parent._parent.ret.tex;
//////// text field
//////////////////////////// arrow up//////////////////////
b_up.onPress = function() {
step = 1;
trackStart = pos._y;
_global.interslow = setInterval(slowUp, 20);
};
b_up.onRollOver = function() {
b_up.gotoAndStop(2);
};
b_up.onRollOut = function() {
b_up.gotoAndStop(1);
};
function slowUp() {
if (pos._y>0) {
pos._y -= (1/step)*koef;
}
setProp(pos._y, currentProp, currentTarget);
//_parent._parent.box.under_mask._y = -1*((_parent._parent._parent.step)*pos._y);
if (step == 20) {
step = 1;
clearInterval(_global.interslow);
}
step++;
}
//////////////////////////// arrow down//////////////////////
b_down.onPress = function() {
step = 1;
trackStart = pos._y;
_global.interslow = setInterval(slowDown, 20);
};
b_down.onRollOver = function() {
b_down.gotoAndStop(2);
};
b_down.onRollOut = function() {
b_down.gotoAndStop(1);
};
function slowDown() {
if (pos._y<380) {
pos._y += (1/step)*koef;
}
setProp(pos._y, currentProp, currentTarget);
//_parent._parent.box.under_mask._y = -1*((_parent._parent._parent.step)*pos._y);
if (step == 20) {
step = 1;
clearInterval(_global.interslow);
}
step++;
}
function setProp(position, prop, target) {
var a = position;
var b = 380;
var c = 0;
var kt:Number = b/currentTarget.maxscroll;
var propValue = (a/kt);
target[prop] = propValue;
}
pos._y = 0;
currentProp = "scroll";
setProp(pos._y, currentProp, currentTarget);
function startSlider(active) {
statusSl = active;
var kt:Number = 520/currentTarget.maxscroll;
if (active) {
this.onMouseMove = function() {
setProp(pos._y, currentProp, currentTarget);
updateAfterEvent();
};
} else {
this.onMouseMove = null;
}
}
//////////////// //////////////// //////////////////
var mouseListener15:Object = new Object();
mouseListener15.onMouseWheel = function() {
var kt:Number = Math.round(520/currentTarget.maxscroll);
if (((currentTarget.scroll)<>(isNaN)) and (pos._y<=380)) {
//pos._y = kt*currentTarget.scroll;
}
};
mouseListener15.onMouseUp = function() {
if (String(statusSl) == "true") {
_global.interslow = setInterval(slow, 20);
}
};
mouseListener15.onMouseDown = function() {
step = 1;
clearInterval(_global.interslow);
trackStart = pos._y;
};
Mouse.addListener(mouseListener15);
/////////// sloooooow ///////////////////
function slow() {
if (((trackStart-pos._y)>0) and (pos._y>0)) {
pos._y -= (1/step)*koef;
}
if (((trackStart-pos._y)<0) and (pos._y<300)) {
pos._y += (1/step)*koef;
}
//setProp(pos._y, currentProp, currentTarget);
//_parent._parent.box.under_mask._y = -1*((_parent._parent._parent.step)*pos._y);
if (step == 20) {
step = 1;
clearInterval(_global.interslow);
}
step++;
}
ýòî åñòü ñåé÷àñ(èçíà÷àëüíî áûëî pos._y=280, òîãäàâ íèæíåé ÷àñòè áóäåò íàõîäèòüñÿ pos, íãî òåêñò íå âåñü ïðîêðó÷åí)
è pos êîãäà â íèæíåé ÷àñòè òî text íå â ñàìîé íèæíåé ÷àñòè, êîãäà æìó b_down òåêñò ïðîêðó÷èâàåòñÿ íèæå è óáåãàåò âíèç pos.
íóæíî ñäåëàòü ÷òîáû Pos â íèæíåé òî÷êå ñîîòâåñòâîâàë òåêñòó â íèæíåé òî÷êå..
ó ñàìîãî íå ïîëó÷àåòñÿ.. ìîæåò êòî ïîìîæåò!
www.vs-des.com/scroll.gif òàê âûãëÿäèò
çàðàíåå âñåì ñïàñèáî