Comunidad de diseño web y desarrollo en internet online

se requiere ayuda en menu3D

Citar            
MensajeEscrito el 05 Jun 2010 06:58 pm
Hola amigos. es mi primer post.

aprendí flash hace muchos años, pero entonces no existia el actionscript, y muchas de las cosas que leo en este foro me suenan a chino.

estoy haciendo una web para mi hermana, que tiene una floristeria, y habia pensado poner en una de las secciones, un menu como el que he visto en vuestra web...

http://www.cristalab.com/files/ejemplos/menu3D/menu3D.html

Al no controlar el action, hago mi flash con etiquetas, y con botones que redirigen a esas etiquetas,amos, a la vieja usanza.

el ejemplo de menu3d, he conseguido personalizarlo, aparece cuando entro en la etiqueta quie lo contiene, pero cuando quiero irme a otra "etiqueta", no sé hacer que el menu 3D desaparezca, permanece ahi,..

alguna sugerencia?? gracias de antemano.

Calais.

PD. refresco el código del fla, para que no tengan que buscarlo...


//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 = "Principal Laboratorio Tutoriales Descargar Enlaces Contacto ";
//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, 249);
};
b2.onPress = function() {
mueveLetras(true, 181);
};
b3.onPress = function() {
mueveLetras(true, 112);
};
b4.onPress = function() {
mueveLetras(true, 49);
};
b5.onPress = function() {
mueveLetras(true, -7);
};
b6.onPress = function() {
mueveLetras(true, -59);
};
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 Calais

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 05 Jun 2010 08:52 pm
cierren hilo.

solucionado.

cargué el menu3d como peli externa, y apliqué luego un unloadmovie, lo metí en otro clip, para posicionarlo, etc,...,

Por Calais

1 de clabLevel



 

firefox

 

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