Flash中控制鼠标的范围!!急急急!!!!!

来源:百度知道 编辑:UC知道 时间:2024/06/10 20:51:09
在Flash中我有一个影片剪辑,我只想滑过它的上半部分引发动作,怎么控制鼠标在这个影片剪辑上的范围………… 高手快点来吧!要人命阿,如果行的话追加20分…………

通过 _root.mc._y 确定 剪辑的上下位置

剪辑 的坐标 是在 中心位置 剪辑的 名称是 mc
加在mc 上的脚本
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse) and _root.mc._ymouse<=0) {
this.gotoAndStop(2);
}
}
滑过上半部mc跳到2 帧

this.addEventListener(MouseEvent.MOUSEOVER,f)
function f(e:MouseEvent){
if(e.localY<0.5*this.height){
//执行你要执行的函数
}
}
//写在影片剪辑或者类里面!

在上半部分放一个透明色的按钮,给那个按钮加听侦器,按钮听到。。。就。。