主题:  为什么松开拖动影片后,影片还在动呀?

andrewlin

职务:普通成员
等级:1
金币:1.0
发贴:184
注册:2001/7/8 16:42:18
#12006/8/17 21:35:59

相关文件(rar):点这儿打开

我做的一个slider,不知道什么原因,松开鼠标后,bar还可以动。我明明已经加了stopDrag了,各位大侠帮忙看一下了,不胜感激!!
这是我用的语句:
_root.slider.bar.onPress = function(){
this.startDrag (true, -2.1, 1, -2.1, 40);
};
_root.slider.bar.onRelease = function() {
this.stopDrag ();
};



captainrays

职务:版主
等级:1
金币:3.0
发贴:48
注册:2005/3/12 23:49:48
#22006/8/23 17:58:41
stopDrag()就行,不用加this.



未来的大师

职务:普通成员
等级:2
金币:1.0
发贴:550
注册:2002/7/30 21:11:58
#32006/9/9 16:42:39
你可以在onrelease后面再用个ONROLLOUT,你这个问题是在元件外面释放鼠标,所以,他无法捕获到onrelease事件了