源码
资讯
  当前位置:源码网网络学院网页制作JavaScript → 超酷的 action script 视觉效果代码
特别推荐
热点TOP10
本周下载排行
本月下载排行
超酷的 action script 视觉效果代码
日期:2007年3月20日 作者: 人气: 查看: [大字体 中字体 小字体]
效果很玄flash action script,代码却很简单。

大致代码如下:

以下是引用片段:
onClipEvent (load) {
x=0 //where the dot is
y=0 //where the dot is
xmove=0 //it's movement
ymove=0 //it's movement
}
onClipEvent (enterFrame) {
xmove+= (_root._xmouse-_x-x)/10 //math
ymove+= (_root._ymouse-_y-y)/10 //math
x+=xmove+(_root._xmouse-_x-x)/10 //math
y+=ymove+(_root._ymouse-_y-y)/10 //math
clear()
lineStyle(1,000000,100)
moveTo(oldx,oldy)
lineTo(x,y)
oldx=x //this is so that in the next frame it knows where the dot was last frame
oldy=y //this is so that in the next frame it knows where the dot was last frame
_rotation-- //This is negative on two of the movieclips (that initially have an opposite rotation to eachother), and positive on the other two.
}

效果预览

(出处:天极网)

百度搜索 Google搜索 雅虎搜索 我要投稿
相关文章: 相关软件: