Comunidad de diseño web y desarrollo en internet online

Menu 3d

Citar            
MensajeEscrito el 22 Feb 2007 01:43 am
Hola, soy nuevo en el foro ( saludos a todos ) necesito si alguien me puede enviar algun tuto de como hacer el famoso menu 3d pero con 2 palabras ( Hogar y Empresa ) aqui el linck de aquel menu: http://www.cristalab.com/files/ejemplos/menu3D/menu3D.html
se les agradece chau.
SL2 ^^

Por lerb

0 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 21 Jun 2007 10:18 pm
//proto q movera las letras
MovieClip.prototype.carusel = function(mover, posicionFinal) {
mueveAngulo(posicionFinal);
if (mover) {
this.onEnterFrame = function() {
this._x = centrox+Math.cos((Math.PI/180)*(angulo+this.angulo))*radio;
this._y = centroy+Math.sin((Math.PI/180)*(angulo+this.angulo))*radio/-20;
this.z = Math.sin((Math.PI/180)*(angulo+this.angulo))*radio;
this._alpha = this._yscale=this._xscale=(100*distanciafocal)/(distanciafocal+this.z);
this.swapDepths(-1*this.z);
};
} else {
delete this.onEnterFrame;
}
};
function mueveAngulo(posicionFinal) {
this.onEnterFrame = function() {
if ((Math.round(angulo)) == Math.round(posicionFinal)) {
mueveLetras(false);
trace("angulo"+angulo+"posicionFinal"+posicionFinal);
delete this.onEnterFrame;
} else {
//contador de frames
if (counter++%30 == 1) {
// updates every 30 frames
thisTime = getTimer();
rate = Math.round(10000/(thisTime-lastTime))/10;
if (rate%1 == 0) {
rate += ".0";
}
fps = "fps: "+rate;
} else if (counter%30 == 1) {
lastTime = getTimer();
}
angl.text = "Angulo : "+Math.round(angulo);
angulo += ((posicionFinal-angulo)/30);
}
};
}
//para ir sumando la profundidad
function maxprofundidad() {
return ++profundidad;
}
//inicio variables
centrox = 500/2;
centroy = 500/2;
radio = 200;
distanciafocal = 400;
//creando los titulos
titulos = " Hogar Empresa ";
//creando los clips q contendran las letras
function creaLetras() {
letras = new Array();
for (i=0; i<=titulos.length; i++) {
letras[i] = titulos.substr(i, 1);
var letra = this.attachMovie("letrita", "letrita"+i, maxprofundidad());
letra.angulo.i = i;
letra.angulo = (360/titulos.length)*i;
letra.contenido.text = letras[i];
letra.carusel(true, 249);
//trace(letra);
}
}
creaLetras();
function mueveLetras(mover, posicionFinal) {
trace(this)
for (i=0; i<=titulos.length; i++) {
this["letrita"+i].carusel(mover, posicionFinal);

}
}
b1.onPress = function() {
mueveLetras(true,0);
};
b2.onPress = function() {
mueveLetras(true,200);
};

stop();
/*posicion angulos
Principal
249
Laboratorio
-178,181
Tutoriales
-248,112
Descargar
-311,49
Enlaces
-367,-7
Contacto
-420,-59
//proto q movera el angulo
MovieClip.prototype.bounce = function(scalexFinal, scaleyFinal, multiplicador, cociente) {
var contar;
this.onEnterFrame = function() {
angulo = this.moviX*multiplicador+(scalexFinal-this._xscale)*cociente;
this._xscale += this.moviX;
this.moviy = this.moviy*multiplicador+(scaleyFinal-this._yscale)*cociente;
this._yscale += this.moviy;
if ((Math.round(this._xscale) == scaleFinal) && (contar++>40)) {
delete this.onEnterFrame;
}
};
};*/

Por tarles2000

3 de clabLevel



Genero:Masculino  

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.