var speed = 0.1;
var topSpace = 2;
var bottomSpace = 10;
var startDragPos = this.dragMc._y;
var startImgPos = this.imgMc._y;
var delTimer = 0;
this.dragMc.onPress = function() {
this.startDrag(false, barMc._x, barMc._y, barMc._x, barMc._y+barMc._height-this._height);
};
this.dragMc.onRelease = function() {
this.stopDrag();
};
this.onMouseMove = function() {
delTimer = 0;
};
this.imgMc._y += topSpace;
this.onEnterFrame = function() {
if (++delTimer<36*2) {
targety = -((this.imgMc._height-this.barMc._height+bottomSpace)*(this.dragMc._y-startDragPos)/(this.barMc._height-this.dragMc._height)-startImgPos);
this.imgMc._y += speed*((targety+topSpace)-this.imgMc._y);
}
};
MovieClip.prototype.mainRollOver = function() {
this.gotoAndStop(2);
};
MovieClip.prototype.mainRollOut = function() {
this.gotoAndStop(1);
};
留下QQ教教我最好了. o(∩_∩)o