Function criaEspiral()
Aqui eu usei a mc tween do zeh:
Aqui
#include "mc_tween2.as"
function criaEspiral(){
var colorRandom:Array = new Array();
colorRandom.push(0xffffff);
colorRandom.push(0xffffff);
colorRandom.push(0xffffff);
var totalColors:Number = Math.round(Math.random() * colorRandom.length)
var xCenter:Number = Stage.width / 2;
var yCenter:Number = Stage.height / 2;
var espace:Number = 5
var numMC:Number = 15;
var circ:Number = 4;
var pi:Number = Math.PI / circ;
var mcQuad:MovieClip = this.createEmptyMovieClip("quad_mc",0);
mcQuad._alpha = 0
with(mcQuad){
beginFill(colorRandom[totalColors],100);
lineTo(-5,0);
lineTo(-5,-5);
lineTo(5,-5);
lineTo(5,5);
lineTo(-5,5);
lineTo(-5,0);
endFill();
_x = xCenter;
_y = yCenter;
for(i=0; i < numMC; i++){
radAngle = i*pi;
duplicateMovieClip("circ_mc"+i,this.getNextHighestDepth());
var totalMovies = this["circ_mc" + i]
totalMovies._alpha = 0
with(totalMovies){
alphaTo(100,.5,"easeInOutExpo",.2)
_x += Math.sin(radAngle) * (espace * (i*2))
_y += Math.cos(radAngle) * (espace * (i*2))
}
totalMovies.onRollOver = function(){
this.xScaleTo(150,.5,"easeOutElastic")
this.yScaleTo(150,.5,"easeOutElastic")
}
totalMovies.onRollOut = function(){
this.xScaleTo(100,.5,"easeOutElastic")
this.yScaleTo(100,.5,"easeOutElastic")
}
}
}
}
criaEspiral()
Nenhum comentário:
Postar um comentário