flash游戏代码问题

来源:百度知道 编辑:UC知道 时间:2024/06/07 02:59:39
做一个 按钮让 按钮随着鼠标移动,
请详细的说出来万分感谢

这个和游戏有什么关系吗?
做一个按钮,我这里就给他起实例名:mc

onEnterFrame = function () {
_root.mc._x += (_root._xmouse-_root.mc._x)/5+9;
_root.mc._y += (_root._ymouse-_root.mc._y)/5
}
这样不就让按钮随鼠标动起来了吗?
有问题加我:455022674
缓动效果下,这个按钮仍然可以被按道。

onClipEvent (enterFrame) {
//鼠标隐藏。
Mouse.hide();
//跟随鼠标。
startDrag(this, true);
}