立体|图片效果
效果:
点击这里下载源文件
代码如下:
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);
};
}
时间: 2024-11-08 20:18:12