Mostrando Codigo - Flash & Actionscript
function createTunnel(nPoint, nCircle, space, power, fogDensity, interval) {
var center =
new Object({x:300, y:300});
var aCircle =
new Array();
var aCoord =
new Array();
var move_var = 0;
_root.space = space;
for (var k = 0; k<=nPoint; k++) {
aCoord
.push(new Object({x:Math.cos(2*k
*pi
/nPoint
), y:Math.sin(2*k
*pi
/nPoint
)}));
}
setInterval(function () {
with (_root) {
move_var++;
clear();
for (j=0; j<=nCircle; j++) {
lineStyle(-1, 0x000000, (100/nCircle*j)-fogDensity);
moveTo(center
.x+Math.cos(((move_var
+j
)/power
))*space
+aCoord
[0].x*j
*space
, center
.y+Math.sin(((move_var
+j
)/power
))*space
+aCoord
[0].y*j
*space
);
for (var k = 0; k<=nPoint; k++) {
lineTo(center
.x+Math.cos(((move_var
+j
)/power
))*space
+aCoord
[k
].x*j
*space
, center
.y+Math.sin(((move_var
+j
)/power
))*space
+aCoord
[k
].y*j
*space
);
}
}
for (j=2; j<=nCircle; j++) {
lineStyle(-1, 0x000000, (100/nCircle*(j-1))-fogDensity);
for (var l = 1; l<=nPoint; l++) {
moveTo(center
.x+Math.cos(((move_var
+j
-1)/power
))*space
+aCoord
[l
].x*(j
-1)*space
, center
.y+Math.sin(((move_var
+j
-1)/power
))*space
+aCoord
[l
].y*(j
-1)*space
);
lineTo(center
.x+Math.cos(((move_var
+j
)/power
))*space
+aCoord
[l
].x*j
*space
, center
.y+Math.sin(((move_var
+j
)/power
))*space
+aCoord
[l
].y*j
*space
);
}
}
}
}, interval);
}
// application :
createTunnel(24, 12, 25, 3.5, 0, 50);
ENLACE AL CODIGO
Si quieres enlazar desde tu pagina a este codigo
COMENTARIOS
Aun no existe ningun comentario para este Codigo.