5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2007-04-12
http://gaoyuanhong.5d.cn/
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2006/10/30 | actionscript鼠标停止几秒后的动作代码
类别(AS学堂)
|
评论
(0)
|
阅读(235)
|
发表于 20:18
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
日志分类
首页
[32]
课件理论
[8]
flash课件
[1]
积件探索
[2]
AS学堂
[10]
课件教程
[1]
随笔
[1]
有效教育(EEPO)
[9]