北京课件制作 上海虚拟现实 广州动画制作 深圳建筑动画 天津三维动画 杭州光盘印刷 厦门企业宣传片 沈阳Flash动画 东莞企业宣传片 济南动画制作 北京光盘印刷 上海影视制作 杭州动画制作
 11 12
发新话题
打印

我做的跟随效果

我做的跟随效果

for (var i = 1; i<=50; i++) { _root.attachMovie("dot", "dot"+i, i); } type1 = 1; _root.dot1.onEnterFrame = function() { if (_root.type1 == 1) { this._xscale = 100; this._yscale = 100; this.stopDrag(); this.k = random(100); if (this.k<20) { this.newx = random(550); this.newy = random(400); } this._x += (this.newx-this._x)/3; this._y += (this.newy-this._y)/3; this._rotation = Math.atan2(this.newy-this._y, this.newx-this._x)*(180/Math.PI); } if (_root.type1 == 2) { this.startDrag(true); } if (_root.type1 == 3) { this.stopDrag(); this._x += 5; this._y += 20*Math.cos(this.ang += 0.2); if (this._x>550) { this._x = 0; } } if (_root.type1 == 4) { this._x += 50*Math.cos((this._rotation += 10)*(Math.PI/180)); this._y += 50*Math.sin((this._rotation += 10)*(Math.PI/180)); } if (_root.type1 == 5) { this._xscale = random(1000); this._yscale = random(1000); this.k = random(100); if (this.k<20) { this.newx = random(550); this.newy = random(400); } this._x += (this.newx-this._x)/3; this._y += (this.newy-this._y)/3; this._rotation = Math.atan2(this.newy-this._y, this.newx-this._x)*(180/Math.PI); } }; _root.onMouseDown = function() { _root.type1++; if(_root.type1>5){ _root.type1=1; } }; for (var i = 2; i<=50; i++) { eval("dot"+i).onEnterFrame = function() { this._x += (eval("dot"+int(this._name.substr(3, 2)-1))._x-this._x)/3; this._y += (eval("dot"+int(this._name.substr(3, 2)-1))._y-this._y)/3; this._rotation = (eval("dot"+int(this._name.substr(3, 2)-1))._rotation-this._rotation)/2; this._yscale += (eval("dot"+int(this._name.substr(3, 2)-1))._yscale-this._yscale)/3; this._xscale += (eval("dot"+int(this._name.substr(3, 2)-1))._xscale-this._xscale)/3; }; } stop();

TOP

我做的跟随效果


真棒!
要是有点规则 或是色彩好看点 更棒

TOP

我做的跟随效果

做得不错![br][br][color=#990000][b]-=-=-=- 以下内容由 [i]梦之星[/i] 在 [i]2007年05月17日 00:22pm[/i] 时添加 -=-=-=-[/b][/color]
学习!`

TOP

我做的跟随效果

好有趣哦,呵呵

TOP

我做的跟随效果

很不错哦。
学习~

TOP

我做的跟随效果

有几种效果哦

TOP

我做的跟随效果

ding 下。。。。好几年米来了。。。

TOP

我做的跟随效果

学楼上的,好几个月没来了,最近跑蓝色理想上面混了。
楼主做的这个效果相当不错!貌似有一个缺点,单击鼠标可以达到楼主想要的效果,但是双击鼠标之后,那些东西就开始乱动了,呵呵,再加一段开关作用的代码应该可以避免这种现象了。

TOP

 11 12
发新话题