flash按钮 当鼠标经过时指针就消失

来源:百度知道 编辑:UC知道 时间:2024/06/28 17:04:07
flash按钮 当鼠标经过时指针就消失
然后它会出现一个捶子代替鼠标

一个简单易懂的方法,将锤子实例名为chui,然后在按钮上写代码
on (rollOver) {
startDrag(chui, true);
chui._visible=1;
Mouse.hide();
}
on (rollOut) {
stopDrag();
chui._visible=0;
Mouse.show();
}

先将你的锤子的元件拖到舞台名字为mc(随便起);在舞台第一帧上写上代码mc._visible=false;
mc.onMouseMove = function() {
this._x = this._parent._xmouse;
this._y = this._parent._ymouse;
updateAfterEvent();
};
在按钮上添加
on(rollOver){
Mouse.hide();
mc._visible=true;
}
on(rollOut){
Mouse.show();
mc._visible=false;
}这样就可以了