Flash AS教程:蝌蚪摆尾动画(2)
http://www.itjxue.com 2015-07-17 23:39 来源:未知 点击次数:
场景里代码
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 ()