Flash制作时,鼠标经过向上按钮时文本向上滚动,不经过时停止,经过向下按钮时文本向下滚动怎么做啊

来源:百度知道 编辑:UC知道 时间:2024/06/08 03:47:47
就像电子杂志上的那样
最好能给个完整的代码。谢咯

给了你的 源代码 你也不一定能看懂 要是不信给你看看

滚动条拖动代码:

var td:Boolean = true;
hk_mc.onPress = function(){
td = false
startDrag(this,false,jdt_mc._x,jdt_mc._y+(hk_mc._height-jdt_mc._height)/2,jdt_mc._x+jdt_mc._width-hk_mc._width,jdt_mc._y+(hk_mc._height-jdt_mc._height)/2)
};
hk_mc.onRelease=function(){
_parent.gotoAndStop(int(_parent._totalframes*(hk_mc._x-jdt_mc._x)/(jdt_mc._width-hk_mc._width)))
td =true;
stopDrag();
};
hk_mc.onReleaseOutside=function(){
_parent.gotoAndStop(int(_parent._totalframes*(hk_mc._x-jdt_mc._x)/(jdt_mc._width-hk_mc._width)))
td =true;
stopDrag();
};

this.onEnterFrame=function(){
if (td) {
hk_mc._x=jdt_mc._x+(jdt_mc._width-hk_mc._width)*_parent._currentframe/_parent._totalframes
}else{
_parent.gotoAndStop(int(_parent._totalframes*(hk_mc._x-jdt_mc._x)/(jdt_mc._width-hk_mc._width)))
}
}

看看怎么样能吗 呵呵

在按钮上添加命令啊