首  页  |  酷站  |  精品网站  |  原创作品秀  |  网络学院   |  信息中心  |  艺术设计  |  求职招聘  |  建站资源  |  服装网站  |  论坛  |  设计部落  |  网站综合
个人网页  商业网站  业界动态  设计赛事  网站资源  下载专区  设计欣赏  CG-插画  JS特效  娱乐  国际品牌  知名品牌  服装院校  专题欣赏  SEO  BANNER
域名注册 虚拟主机 广州网站建设 广州网页设计 IDC赞助 设计资源下载 虚拟主机 域名注册 品牌网站建设 服装品牌网站建设 广告服务 网站推广 娱乐
当前位置:首 页 >> JS特效 >> 鼠标事件类 >> 一个鼠标效果,代码简单易懂,效果不错的

一个鼠标效果,代码简单易懂,效果不错的


中资源
转载请注明出处-中国设计秀-cnwebshow.com

var posYoubiao:Array = new Array(); 
posYoubiao[0] = 5; 
for (i=1; i<6; i++) { 
        //预先设置好游标的位置 
        posYoubiao[i] = 5+(i)*95; 

function youbiaoMotion(no:Number) { 
        youbiaoTarget = posYoubiao[no]; 
        //从预先算好的游标位置中取得当前游标的坐标位置 
        youbiao0.onEnterFrame = function() { 
                youbiao0._x = youbiao0._x+(youbiaoTarget-youbiao0._x)*0.2; 
                if (Math.abs(youbiaoTarget-youbiao0._x)<=0.2) { 
                        youbiao0._x = youbiaoTarget; 
                        delete this.onEnterFrame; 
                } 
        }; 
}

//////////////按钮事件/////////////


for (i=0; i<6; i++) { 
        this["topMenu_btn"+i].no = i; 
        this["topMenu_btn"+i].useHandCursor = false; 
        this["topMenu_btn"+i].onRollOver = function() { 
                if (nowYoubiao != this.no) { 
                        youbiaoMotion(this.no); 
                } 
        }; 
        this["topMenu_btn"+i].onRelease = function() { 
                //鼠标点击事件 
        }; 
}
////////////////////////
转载请注明出处-中国设计秀-cnwebshow.com



投稿 】【对本文进行评论】 【字体: 】【发布于2006-12-08 15:02】
 认证LOGO下载
     
Copyright © 2005-2007 中国设计秀_网页设计教程_优秀网页设计欣赏_平面设计欣赏 All Right Reserved.
做最专业的设计服务网站,秀出自我,秀出精彩!中国设计秀,秀---无处不在!!
QQ:54292427  8208442 MSN:kingvisual#hotmail.com 交流群:9107036 3848215 8850631
粤ICP备05067046号 RSS