触角
作者 佚名技术
来源 服务器技术
浏览
发布时间 2012-07-10
|
点击浏览该文件
function drawCurve() { with (room) { clear(); var i = 0; while ((++i)<=c) { var mc = room["mc"+i]; var cx = (mc._x+mc.px)/2; var cy=(mc._y+mc.py)/2; var ccx = (mc._x-mc.px)/2; lineStyle(3, "0xFFCC00", 100); moveTo(mc._x, mc._y); curveTo(cx+ccx, cy, cx, cy); curveTo(cx-ccx, cy, mc.px, mc.py); } } } //////////////////////////////////////////// _level0.createEmptyMovieClip("room", 10); c=10; var i = 0; while ((++i)<=c) { var ball = room.attachMovie("mc", "mc"+i, i); if (room["mc"+(i-1)]._x == undefined) { prev = 0; } else { prev = room["mc"+(i-1)]._x; } ball._rotation=random(360); ball._xscale=ball._yscale=70+random(30); ball.sx=ball._x = prev+500/c/2+random(500/c/2); ball.sy=ball._y = random(100)+100; ball.px = ball._x+50-random(100); ball.py = 400; ball.tx = ball._x+100-random(200); ball.ty = ball._y+100-random(200); ball.onEnterFrame = function() { this._x += (this.tx-this._x)*.1; this._y += (this.ty-this._y)*.1; if (int(this.tx-this._x) == 0 && int(this.ty-this._y) == 0) { this.tx = this.sx+100-random(200); this.ty = this.sy+100-random(200); } }; } setInterval(drawCurve, 20);
| 点击浏览该文件
关键词: |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn
为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!
|