5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2007-09-22
http://yuheduo.5d.cn/
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2006/01/16 | actionscript鼠标停止几秒后的动作
类别(Flash学习)
|
评论
(0)
|
阅读(218)
|
发表于 09:33
actionscript鼠标停止几秒后的动作代码
var mouseListener:Object = {};
var stillFor = 5000//停止的时间,你可以自己定义
mouseListener.onMouseMove = function ():Void {
if (this.timer) {
clearInterval (this.timer);
trace("你的鼠标动了");
//your code here:
//what to do onMouseMove
}
this.timer = setInterval (_root, "mouseTimeout", stillFor, this);
};
Mouse.addListener (mouseListener);
function mouseTimeout (listener:Object):Void {
clearInterval (listener.timer);
trace("你已停止5秒了");
//your code here:
//what to do after 5 sec (stillFor) of mouse inactivity
}
0
评论
Comments
日志分类
首页
[149]
blog记事
[7]
Flash学习
[85]
教学记忆
[21]
娱乐影音
[9]
我的收藏
[27]
PhotoShop学习
[0]