spring boot 跨域配置:《Flash AS制作蝌蚪摆尾特效动画第11612教程》干群共产主义国家名牌大学义务教育编号2012011612

来源:百度文库 编辑:中财网 时间:2024/05/03 04:54:49

干群共产主义国家名牌大学义务教育编号2012011612:
《Flash AS制作蝌蚪摆尾特效动画第11612教程》

干群共产主义国家名牌大学义务教育编号2012011612
《Flash AS制作蝌蚪摆尾特效动画第11612教程》


干群教授:大家好!欢迎你们来访中国参观考察学习!
第11612教程:Flash AS制作蝌蚪摆尾特效动画

本文中我们用Flash 的 AS代码来编写一个蝌蚪自由摆尾游动的动画。
效果查看:演示:
',1)">景里代码:
Object.environment = this;
Math.prototype.degrees = function (r)
{
return (r * 180 / 3.141593E+000);
};
maxtents = 3;
this.onEnterFrame = function ()
{
if (!random(30) && tents < maxtents)
{
var nombre = "tent" + String(depth++);
var neo = this.attachMovie("tentacle", nombre, depth);
neo._x = random(600);
neo._y = 370;
neo.theta = 270;
++tents;
} // end if
};
stop ()
MC里的代码:
#initclip 1
function TentacleClass()
{
this.numNodes = 27;
this.head = 2 + random(4);
this.girth = 8 + random(12);
this.speedCoefficient = 9.000000E-002 + random(10) / 50;
this.friction = 9.000000E-001 + random(10) / 100;
this.muscleRange = 20 + random(50);
this.muscleFreq = 1.000000E-001 + random(100) / 250;
this.generateNodes();
this.onEnterFrame = this.move;
} // End of the function
TentacleClass.prototype = new MovieClip();
TentacleClass.prototype.generateNodes = function ()
{
this.node = new Array();
var n = 0;
while (n < this.numNodes)
{
var point = {x: 0, y: 0};
this.node.push(point);
++n;
} // end while
};
TentacleClass.prototype.move = function ()
{
this.tv = this.tv + 5.000000E-001 * (Math.random() - Math.random());
this.theta = this.theta + this.tv;
this.tv = this.tv * this.friction;
this.node[0].x = this.head * Math.cos(1.745329E-002 * this.theta);
this.node[0].y = this.head * Math.sin(1.745329E-002 * this.theta);
this.count = this.count + this.muscleFreq;
this.thetaMuscle = this.muscleRange * Math.sin(this.count);
this.node[1].x = -this.head * Math.cos(1.745329E-002 * (this.theta + this.thetaMuscle));
this.node[1].y = -this.head * Math.sin(1.745329E-002 * (this.theta + this.thetaMuscle));
var i = 2;
while (i < this.numNodes)
{
var dx = this.node.x - this.node[i - 2].x;
var dy = this.node.y - this.node[i - 2].y;
var d = Math.sqrt(dx * dx + dy * dy);
this.node.x = this.node[i - 1].x + dx * this.girth / d;
this.node.y = this.node[i - 1].y + dy * this.girth / d;
if (i == 2)
{
this._x = this._x - dx * this.speedCoefficient;
this._y = this._y - dy * this.speedCoefficient;
if (this._x + this._width < 0 || this._x - this._width > 600 || this._y + this._height < 0 || this._y - this._height > 400)
{
--Object.environment.tents;
this.removeMovieClip();
} // end if
} // end if
++i;
} // end while
this.clear();
this.moveTo(this.node[1].x, this.node[1].y);
var i = 2;
while (i < this.numNodes)
{
this.lineStyle(int(this.numNodes - i) * (this.numNodes - i) / 20, 16777215, 100);
this.lineTo(this.node.x, this.node.y);
++i;
} // end while
};
Object.registerClass("tentacle", TentacleClass);
#endinitclip


',2)">
',3)">


干群共产主义国家网易博客网址- http://blog.163.com/heimudan_ok/
环球总裁CEO名人世界网址-http://ganqunqueen.blog.163.com/干群新浪博客网址- http://blog.sina.com.cn/heimudanbest/干群搜狐博客网址- http://heimudan88888.blog.sohu.com/干群皇太后360doc个人图书馆- http://ganqun19691104.360doc.com/
健康长寿是做人最大财富!世界人民是一家人,让我们携手成为好朋友!
干群在此感谢国际互联网网友博友们的大力支持和关心厚爱!!
博客女王创造发明法制新闻PS教程U5教程健康长寿
成功励志奇闻怪事世界名人婚姻家庭国际航空国际时尚
世界儿童世界名画干群皇太后欢迎你们来访我国并留言交流 顶级佛学
☆名博基本技巧☆
☆电脑操作技巧☆
☆电脑专家门诊☆
☆电脑系统加速☆
☆制作个性印章☆
☆制作精彩电影☆
☆神秘魔方相册☆
☆闪动边框制作☆
☆制作精美相册☆
☆透明睡衣制作☆
☆制作闪亮紫钻☆
☆飞翔气球制作☆
☆质感美女油画☆
☆怀旧照片制作☆
☆实用网页制作☆
☆光影魔术日历☆
☆图片制作水波☆
☆名博技巧经典☆
☆各种表格制作☆
☆特效个性签名☆
☆图片自由舞动☆
☆应用编程制作☆
☆快速还原系统☆
☆图片艺术特效☆
☆制作个性音乐☆
☆快捷办公技巧☆
☆博客日志背景☆
☆屏幕截图方法☆
☆制作发光文字☆
☆释放磁盘空间☆
☆制作美食效果☆
☆鼠标助理弹琴☆
☆精美动画素材☆
☆制作精美邮票☆
☆美图动画欣赏☆
☆绘图软件技巧☆
☆特效动态文字☆
☆文字扫光处理☆
☆移动硬盘分区☆
☆美妙音画背景☆
☆提高博客票房☆
☆网易颜色代码☆