Flash制作环绕的立体图片效果动画
类别: Flash教程
效果:
« Full Screen »
代码如下:
代码如下:
var totalPhotoBL:Number = 7;
//图片总张数;
var angleBL:Number = 2*Math.PI/(totalPhotoBL-1);
//角度值,用于平均分配所有图在360度里;
var scaleBL:Number = 30;
//缩放比例值;
var speedBL:Number = Math.PI/180;
// 声明一个速度值;
for (var i = 0; i<totalPhotoBL; i++) {
duplicateMovieClip(photoMC, "newMC"+i, i);
this["newMC"+i].gotoAndStop(i+1);
this["newMC"+i].angleBL = i*angleBL;
this["newMC"+i].onEnterFrame = function() {
this.angleBL -= speedBL;
this.c = 2-Math.abs(Math.cos(this.angleBL/2+90*speedBL))
this._y = 90;
this._alpha=90*this.c*this.c
this._x = Math.sin(this.angleBL)*250+275;
this._xscale = Math.cos(this.angleBL)*20*this.c;
this._yscale = 15*this.c;
this.depth = Math.round(this.c*100);
this.swapDepths(this.depth);
};
}
//图片总张数;
var angleBL:Number = 2*Math.PI/(totalPhotoBL-1);
//角度值,用于平均分配所有图在360度里;
var scaleBL:Number = 30;
//缩放比例值;
var speedBL:Number = Math.PI/180;
// 声明一个速度值;
for (var i = 0; i<totalPhotoBL; i++) {
duplicateMovieClip(photoMC, "newMC"+i, i);
this["newMC"+i].gotoAndStop(i+1);
this["newMC"+i].angleBL = i*angleBL;
this["newMC"+i].onEnterFrame = function() {
this.angleBL -= speedBL;
this.c = 2-Math.abs(Math.cos(this.angleBL/2+90*speedBL))
this._y = 90;
this._alpha=90*this.c*this.c
this._x = Math.sin(this.angleBL)*250+275;
this._xscale = Math.cos(this.angleBL)*20*this.c;
this._yscale = 15*this.c;
this.depth = Math.round(this.c*100);
this.swapDepths(this.depth);
};
}
- 上一篇: Flash中像素字体使用技巧
- 下一篇: Flash制作星星随鼠标残影效果
-= 资 源 教 程 =-
文 章 搜 索