Comunidad de diseño web y desarrollo en internet online

Ayuda con botones AS....getURL!!

Citar            
MensajeEscrito el 04 Jun 2009 11:34 pm
tengo un menu elastico realizado por as...pero no se como hacer para ponerle el getURL, Aca les dejo el codigo para q me ayuden por favor!

Código :

Lnombre = new Array("Home", "Productos", "Servicios", "Ocasiones", "Tarifas","Metodologia","Como Comprar","Contacto","Nosotros");
Lfotogramas = new Array(10, 20, 30, 40,50,60,70);
posx = 100;
posy = 90;
distancia = 40;
prepara();
function prepara() {
   vel = new Array();
   long = Lnombre.length;
   for (n=0; n<Lnombre.length; n++) {
      vel[n] = 0;
      _root.attachMovie("boton", "b"+n, n);
      _root["b"+n].titulo = Lnombre[n];
      _root["b"+n]._x = posx;
      _root["b"+n]._y = posy+(n*distancia);
      _root["b"+n].onRelease = function() {
         _root.gotoAndStop(Lfotogramas[n]);
      };
      _root["b"+n].onRollOver = function() {
         sel = this;
      };
      _root["b"+n].onRollOut = function() {
         sel = 0;
      };
   }
   sel = 0;
   idmove = setInterval(mover, 20);
}
// Movimiento
function mover() {
   for (n=0; n<Lnombre.length; n++) {
      if (sel == _root["b"+n]) {
         dest = 30;
         destino =150;
      } else {
         dest = 1;
         destino =100;
      }
      if (_root["b"+n]._currentframe<dest) {
         _root["b"+n].gotoAndStop(_root["b"+n]._currentframe+1);
      }
      if (_root["b"+n]._currentframe>dest) {
         _root["b"+n].gotoAndStop(_root["b"+n]._currentframe-1);
      }
      
      dif = destino-_root["b"+n]._xscale;
      elast = 0.03;
      fric = 0.9;
      trace(vel[n]);
      vel[n] = (vel[n]*fric)+((dif)*elast);
      _root["b"+n]._xscale += vel[n];
      _root["b"+n]._yscale += vel[n];
   }
}

Por noxivodrums

20 de clabLevel



 

Barranquilla-Colombia

firefox
Citar            
MensajeEscrito el 05 Jun 2009 11:57 am
Aquí estas intentando que vaya a un fotograma, pero como n se sobreescribe sospecho que todas van al último:

Código ActionScript :

_root["b"+n].onRelease = function() {
         _root.gotoAndStop(Lfotogramas[n]);
      };


Luego copia n a la línea de tiempo del boton (que debe ser un MovieClip)

Código ActionScript :

_root["b"+n].destino = Lfotogramas[n]
_root["b"+n].onRelease = function() {
         _root.gotoAndStop(this.destino);
      };


El getURL lo puedes poner directamente en el fotograma destino, o sino puedes hacer un nuevo array de urls y usando la misma técnica (copiar el dato al timeline del MC) agregar el getURL: en el onRelease

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 05 Jun 2009 05:16 pm
:( Soy novato en esto, aca les dejo un pantallazo a ver si me pueden ayudar por favoooooor!!!! :oops:

Por noxivodrums

20 de clabLevel



 

Barranquilla-Colombia

firefox
Citar            
MensajeEscrito el 05 Jun 2009 06:31 pm
¿Un pantallazo? ¿Para que?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 05 Jun 2009 09:52 pm
Por q no se cual es el fotograma de destino... tu me podras hacer un ejemplo a ver si entiendo???
te agradeceria bastante...gracias!

Por noxivodrums

20 de clabLevel



 

Barranquilla-Colombia

firefox
Citar            
MensajeEscrito el 05 Jun 2009 09:53 pm
del arrays de urls

Por noxivodrums

20 de clabLevel



 

Barranquilla-Colombia

firefox
Citar            
MensajeEscrito el 06 Jun 2009 12:16 pm
Mmm ... mucho tufo a copy&paste y NPI ....
¿Estás usando realmente el ir a distintos fotogramas, del 10 al 70 como tienes declarado en tu code?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

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