Flash AS2实例 跳动的小球动画效果
平面设计 2021-07-03 14:34www.168986.cn平面设计培训
效果显示
详细代码
//AS2.0 QQ:31559783 2009.11.28
MovieClip.prototype.zl = function() {
this.vg = 0.7;
this.vy = 0;
this.vx = 0;
this.an = true;
this.onEnterFrame = function() {
this.vy += this.vg;
this._y += this.vy;
this._x += this.vx;
if (this._x>550) {
this._x = 0;
}
if (this._x<0) {
this._x = 550;
}
if (this._y>300) {
this._y = 300;
this.vy = -0.5;
this.vx = 0.9;
}
if (this._y == 300 && this.an == true) {
ss(this._x, this._y);
}
if (this._y == 300 && Math.abs(this.vy) >> 0 == 0) {
this.an = false;
}
};
this.tt = function() {
this.vg = 0.7;
this.vy = 0;
this.vx -= (this._x-_root._xmouse)/30;
this.dy = this._y-_root._ymouse;
this.vy -= this.dy/10;
};
};
function ss(X, Y) {
var sj = (Math.random()10+20) >> 0;
for (var i = 0; i<sj; i++) {
var mc = this.createEmptyMovieClip("huaxian_mc", this.getNextHighestDepth());
mc._x = X;
mc._y = Y;
mc.lineStyle(Math.random()3, 0, 100);
mc.moveTo(0, 0);
mc.lineTo(1, 0);
mc.vx = random(20)-10;
mc.vy = random(20)-10;
mc.onEnterFrame = function() {
this._x += this.vx;
this._y += this.vy;
this.vy += 0.8;
this._alpha -= 2;
if (this._alpha<1 || this._y>=300) {
this.removeMovieClip();
}
};
}
}
mc.zl();
mc1.zl();
this.onMouseDown = function() {
if (mc.an == false) {
ss(mc._x, mc._y);
mc.an = true;
mc.tt();
}
};
this.onEnterFrame = function() {
if (random(50) == 0) {
if (mc1.an == false) {
ss(mc1._x, mc1._y);
mc1.an = true;
mc1.tt();
}
}
};
flv文件下载
详细代码
复制代码
代码如下://AS2.0 QQ:31559783 2009.11.28
MovieClip.prototype.zl = function() {
this.vg = 0.7;
this.vy = 0;
this.vx = 0;
this.an = true;
this.onEnterFrame = function() {
this.vy += this.vg;
this._y += this.vy;
this._x += this.vx;
if (this._x>550) {
this._x = 0;
}
if (this._x<0) {
this._x = 550;
}
if (this._y>300) {
this._y = 300;
this.vy = -0.5;
this.vx = 0.9;
}
if (this._y == 300 && this.an == true) {
ss(this._x, this._y);
}
if (this._y == 300 && Math.abs(this.vy) >> 0 == 0) {
this.an = false;
}
};
this.tt = function() {
this.vg = 0.7;
this.vy = 0;
this.vx -= (this._x-_root._xmouse)/30;
this.dy = this._y-_root._ymouse;
this.vy -= this.dy/10;
};
};
function ss(X, Y) {
var sj = (Math.random()10+20) >> 0;
for (var i = 0; i<sj; i++) {
var mc = this.createEmptyMovieClip("huaxian_mc", this.getNextHighestDepth());
mc._x = X;
mc._y = Y;
mc.lineStyle(Math.random()3, 0, 100);
mc.moveTo(0, 0);
mc.lineTo(1, 0);
mc.vx = random(20)-10;
mc.vy = random(20)-10;
mc.onEnterFrame = function() {
this._x += this.vx;
this._y += this.vy;
this.vy += 0.8;
this._alpha -= 2;
if (this._alpha<1 || this._y>=300) {
this.removeMovieClip();
}
};
}
}
mc.zl();
mc1.zl();
this.onMouseDown = function() {
if (mc.an == false) {
ss(mc._x, mc._y);
mc.an = true;
mc.tt();
}
};
this.onEnterFrame = function() {
if (random(50) == 0) {
if (mc1.an == false) {
ss(mc1._x, mc1._y);
mc1.an = true;
mc1.tt();
}
}
};
flv文件下载
平面设计师
- 免费平面设计网站 免费平面设计绘图软件
- 平面设计基础知识题库
- 平面设计基础学包括哪些
- ui设计师工资一般多少 北京ui设计师工资一般多少
- 平面设计技巧方法 平面设计技巧总结
- 哪里的平面设计培训班比较好 哪家平面培训设计
- 哪些人不适合学平面设计 平面设计师工资一般多
- 女生学习平面设计还有其独特的优势
- 平面设计大学专业叫什么 平面设计大学专业叫什
- ui就业前景和工资待遇 ui就业前景和工资待遇怎么
- 平面设计ps入门教程 平面设计photoshop 基本操作方
- 免费学平面设计教程 平面设计免费教程网站
- 平面设计就业方向有哪些 平面设计专业就业前景
- 女生学什么设计前景好 女孩学什么设计好赚钱
- 什么人适合学平面设计 学平面设计后悔死了
- 平面设计内容有哪些 平面设计内容包括什么