...
一个进度控制棒
时间:2007-8-21 6:17:48 来源:本站收集整理 作者:佚名
拖拽 = false;
onEnterFrame = function () {
if (拖拽 == false) {
berX = _parent._currentframe/(_parent._totalframes/jdb._width);
ber._x = berX;
}
if (拖拽 == true) {
_parent.gotoAndStop(Math.floor((Math.abs(ber._x)+1)*(_parent._totalframes/jdb._width)));
}
if (ber._x<=0 && 拖拽 == true) {
ber._x = 0;
_parent.gotoAndStop(1);
}
if (ber._x>=jdb._width) {
拖拽 = true;
}
};
ber.onPress = function() {
startDrag("ber", false, 0, 0, jdb._width, 0);
拖拽 = true;
};
ber.onRelease = ber.onReleaseOutside=function () {
stopDrag();
拖拽 = false;
_parent.play();
};
Nmove.onPress = function() {
拖拽 = true;
ber._x += 20;
if (ber._x>=jdb._width) {
ber._x = 0;
}
};
Pmove.onPress = function() {
拖拽 = true;
ber._x -= 20;
if (ber._x<=0) {
ber._x = 0;
}
};
pus.onPress = function() {
拖拽 = true;
ber._x = ber._x;
};
playbtn.onPress = function() {
if (拖拽 == true) {
_parent.play();
}
拖拽 = false;
};
jdb.onPress = function() {
拖拽 = true;
ber._x = _xmouse;
};
jdb.onRelease = jdb.onReleaseOutside=function () {
拖拽 = false;
_parent.play();
};
onEnterFrame = function () {
if (拖拽 == false) {
berX = _parent._currentframe/(_parent._totalframes/jdb._width);
ber._x = berX;
}
if (拖拽 == true) {
_parent.gotoAndStop(Math.floor((Math.abs(ber._x)+1)*(_parent._totalframes/jdb._width)));
}
if (ber._x<=0 && 拖拽 == true) {
ber._x = 0;
_parent.gotoAndStop(1);
}
if (ber._x>=jdb._width) {
拖拽 = true;
}
};
ber.onPress = function() {
startDrag("ber", false, 0, 0, jdb._width, 0);
拖拽 = true;
};
ber.onRelease = ber.onReleaseOutside=function () {
stopDrag();
拖拽 = false;
_parent.play();
};
Nmove.onPress = function() {
拖拽 = true;
ber._x += 20;
if (ber._x>=jdb._width) {
ber._x = 0;
}
};
Pmove.onPress = function() {
拖拽 = true;
ber._x -= 20;
if (ber._x<=0) {
ber._x = 0;
}
};
pus.onPress = function() {
拖拽 = true;
ber._x = ber._x;
};
playbtn.onPress = function() {
if (拖拽 == true) {
_parent.play();
}
拖拽 = false;
};
jdb.onPress = function() {
拖拽 = true;
ber._x = _xmouse;
};
jdb.onRelease = jdb.onReleaseOutside=function () {
拖拽 = false;
_parent.play();
};
...
