Comunidad de diseño web y desarrollo en internet online

Ayuda con Menu

Citar            
MensajeEscrito el 09 Mar 2009 02:30 pm
Aunque sigo esta web desde hace ya algunos años nunca habia escrito en el foro, así que saludos a todos.

He visto en esta web www.insigna.es un menu el cual me gusta bastante. ¿Alguien me podria decir como hacerlo? Me refiero al menu de la izquierda.


Saludos

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 09 Mar 2009 06:28 pm
busca pro el tutorial de boton atras adelante

Por FeNtO

BOFH

5091 de clabLevel

18 tutoriales

1 ejemplo

  Bastard Operators From Hell

FeNtO DataCenter

firefox
Citar            
MensajeEscrito el 10 Mar 2009 05:48 pm
Vamos nadie se anima a echarme una mano!!!!!!!!!

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 13 Mar 2009 05:32 pm
Joder!!!!! no hay nadie que me pueda echar una mano, pense que el foro era mas animando....vaya asco

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 13 Mar 2009 09:00 pm
dankill. tenes q tener paciencia, tu mensaje sera visto y si se puede sera respondido de la mejro manera, pero ten paciencia.
con respecto al menu, no se a cual es el q te refieres, ya que sale una pag, donde hay un menu para elegir el idioma y otro menu luego en una pagina ques esta sobre el borde inferior, donde dice "empresa".....

podrias ser mas especifico en cual es el menu que deseas realizar????

sino pudes directamente fijarte en la esquina superiro derecha, en el buscador, poner menu o alguna referencia y saldran muchos tutoriales.

saludos

Por bubudrc

Claber

591 de clabLevel

1 tutorial

 

mayo 2006

firefox
Citar            
MensajeEscrito el 14 Mar 2009 08:32 pm
Encontre este código que hace exactamente lo que quiero, el problema es que nose donde ponerle las acciones para que me carge un .swf con loadMovie.

¿Alguna sugerencia?



Código :

import mx.transitions.easing.*;
import flash.filters.*;
this.initMenu();
function initMenu(btn):Void {
   var sx:Number = 30;
   var sy:Number = 30;
   var easeTypes:Array = new Array(Back, Bounce, Elastic, Strong);
   var backFormat:TextFormat = new TextFormat();
   backFormat.font = "expVerdana";
   backFormat.color = 0x333333;
   var frontFormat:TextFormat = new TextFormat();
   frontFormat.font = "expVerdana";
   //trace("esto es una prueba nose pona nervioso");
   frontFormat.color = 0xFF6600;
   var rollSound:Sound = new Sound();
   rollSound.attachSound("click");
   btn.onPress = function() {
      loadMovie("hola.swf",100);}
   for (var i:Number = 0; i < easeTypes.length; i++) {
      var rb:RollButton = this.attachMovie("RollButton", "rollButton" + this.getNextHighestDepth(), this.getNextHighestDepth());
      rb.setTween(easeTypes[i].easeOut, 20);
      rb.setText(null, frontFormat, backFormat);
      rb._x = sx + i * rb._width;
      rb._y = sy;
      rb.addListener(rollSound);
   }
   rollSound["onRollOver"] = function ():Void {
      this.start();
   };
   delete initMenu;
}

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 14 Mar 2009 08:42 pm
hola.
esta es la linea donde hace referencia al archivo externo a cargar:

Código :

btn.onPress = function() {
      loadMovie("hola.swf",100);}

en este caso, btn, es un boton que tiene ese nombre de instancia.
onPress, es la funcion que realiza al presionarlo.
loadMovie es el metodo que permite decirle que cargar
"hola.swf", es el nombre del archivo a cargar, y 100 es el lugar, es decir el MC contenedor del objeto swf.

en este link, puedes encontrar mas opciones:
http://foros.cristalab.com/loadmovie---loadmovienum-t15181/

saludos

Por bubudrc

Claber

591 de clabLevel

1 tutorial

 

mayo 2006

firefox
Citar            
MensajeEscrito el 14 Mar 2009 08:47 pm
Hola muchas gracias por la respuesta, pero esa parte del código es la que he puesto yo y no funciona. Es decir el código original sería este.




Código :

import mx.transitions.easing.*;
import flash.filters.*;
this.initMenu();
function initMenu():Void {
   var sx:Number = 30;
   var sy:Number = 30;
   var easeTypes:Array = new Array(Back, Bounce, Elastic, Strong);
   var backFormat:TextFormat = new TextFormat();
   backFormat.font = "expVerdana";
   backFormat.color = 0x333333;
   var frontFormat:TextFormat = new TextFormat();
   frontFormat.font = "expVerdana";
   frontFormat.color = 0xFF6600;
   var rollSound:Sound = new Sound();
   rollSound.attachSound("click");
   for (var i:Number = 0; i < easeTypes.length; i++) {
      var rb:RollButton = this.attachMovie("RollButton", "rollButton" + this.getNextHighestDepth(), this.getNextHighestDepth());
      rb.setTween(easeTypes[i].easeOut, 20);
      rb.setText(null, frontFormat, backFormat);
      rb._x = sx + i * rb._width;
      rb._y = sy;
      rb.addListener(rollSound);
   }
   rollSound["onRollOver"] = function ():Void {
      this.start();
   };
   delete initMenu;
}

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 14 Mar 2009 09:04 pm
la verdad es poco entendible que pongas el codigo de esta forma, porq no se q es cada cosa, es decir, q es boton, q es texto, q es sonido, etc.....

pero lo mas probable es esta parte:
[code]
rb.addListener(rollSound);
}
rollSound["onRollOver"] = function ():Void {
this.start();
[code]
rb.addListener(rollSound); lo q dice aca es que a al "boton" de nombre de instancia "rb" le agrega un listener, es decir una accion, llamada rollSound

entonces depsues la funcion rollSound dice:
[code]rollSound["onRollOver"] = function ():Void {
this.start();
}[/code]
donde "onRollover", como antes pusiste onPress es la accion, en tu caso creo q necesitas cambiarlo por "click", como aca:
[code] rollSound.attachSound("click")[/code]
y luego ejecutas lo q desees en la funcion, por lo yq modificarias this.start() por loadMovie("hola.swf",100);

finalmente, lo que tendrias q cambiar vos seria:
[code]
btn.addListener(rollSound);
}

rollSound["click"] = function ():Void {
loadMovie("hola.swf",100)
};
[/code]
fijate si funciona

Por bubudrc

Claber

591 de clabLevel

1 tutorial

 

mayo 2006

firefox
Citar            
MensajeEscrito el 14 Mar 2009 10:08 pm
Bueno he conseguido darle una acciona al boton para que abra un .swf. Lo que ocurre es que este script me crea cuatro botones los cuales salen en el array (Back, Bounce, Elastic, Strong), lo que nose porque la accion de abrir un swf se lo aplica solo al ultimo boton.¿ Como podria darle nombre de instancia a los botones para asi aplicarle los loadMovie a cada uno?



Código :

import mx.transitions.easing.*;
import flash.filters.*;
this.initMenu();
function initMenu():Void {
   var sx:Number = 30;
   var sy:Number = 30;
   var easeTypes:Array = new Array(Back, Bounce, Elastic, Strong);
   var backFormat:TextFormat = new TextFormat();
   backFormat.font = "expVerdana";
   backFormat.color = 0x333333;
   var frontFormat:TextFormat = new TextFormat();
   frontFormat.font = "expVerdana";
   frontFormat.color = 0xFF6600;
   var rollSound:Sound = new Sound();
   rollSound.attachSound("click");
   for (var i:Number = 0; i < easeTypes.length; i++) {
      var rb:RollButton = this.attachMovie("RollButton", "rollButton" + this.getNextHighestDepth(), this.getNextHighestDepth());
      rb.setTween(easeTypes[i].easeOut, 20);
      rb.setText(null, frontFormat, backFormat);
      rb._x = sx + i * rb._width;
      rb._y = sy;
      rb.addListener(rollSound);
   }
   rollSound["onRollOver"] = function ():Void {
      this.start();
   };
   rb.onRelease = function ():Void {
      loadMovie("hola.swf",100);
   };
      

   delete initMenu;
}

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 14 Mar 2009 10:33 pm
puedes proba:

Código :

for (var i:Number = 0; i < easeTypes.length; i++) {
      var rb[i]:RollButton = this.attachMovie("RollButton", "rollButton" + this.getNextHighestDepth(), this.getNextHighestDepth());
      rb[i].setTween(easeTypes[i].easeOut, 20);
      rb[i].setText(null, frontFormat, backFormat);
      rb[i]._x = sx + i * rb._width;
      rb[i]._y = sy;
      rb[i].addListener(rollSound);
   }
   rollSound["onRollOver"] = function ():Void {
      this.start();
   };
   rb[i].onRelease = function ():Void {
      loadMovie("hola.swf",100);
   };

o sea, agregarle un indice al boton para decirle qu hacer:
si sabes q son 4:

Código :

rb[1].addListener(rollSound_1);

rb[2].addListener(rollSound_2);

rb[3].addListener(rollSound_3);

rb[4].addListener(rollSound_4);
//y despues creas 4 funciones:

rb[1].onRelease = function ():Void {
      loadMovie("hola_1.swf",100);
   };

rb[2].onRelease = function ():Void {
      loadMovie("hola_2.swf",101);
   };

rb[3].onRelease = function ():Void {
      loadMovie("hola_3.swf",102);
   };

rb[4].onRelease = function ():Void {
      loadMovie("hola_4.swf",103);
   };

Por bubudrc

Claber

591 de clabLevel

1 tutorial

 

mayo 2006

firefox
Citar            
MensajeEscrito el 14 Mar 2009 11:50 pm
He probado como me has dicho y no funciona, he de decirte que el archivo .fla va acompañado de un .as cuya programación es la de abajo nose si te servira para poder ayudarme.

Gracias




Código :

import mx.transitions.Tween;
class RollButton extends MovieClip {
   private static var ASBDependancy = _global.AsBroadcaster.initialize(RollButton.prototype);
   private var broadcastMessage:Function;
   public var addListener:Function;
   public var removeListener:Function;
   private var frontLabel:TextField;
   private var backLabel:TextField;
   private var frontLabelTween:Tween;
   private var backLabelTween:Tween;
   private var textMask:MovieClip;
   private var hitAreaRec:MovieClip;
   private var autoSize:Boolean = true;
   private var duration:Number = 15;
   private function RollButton() {
      this.frontLabelTween = new Tween(this.frontLabel, "_y", null, this.frontLabel._y, this.frontLabel._y, 1, false);
      this.backLabelTween = new Tween(this.backLabel, "_y", null, this.backLabel._y, this.backLabel._y, 1, false);
      this.frontLabel.autoSize = this.backLabel.autoSize = true;
      this.frontLabel.embedFonts = this.backLabel.embedFonts = true;
   }
   public function setText(text:String, frontFormat:TextFormat, backFormat:TextFormat):Void {
      if (text) {
         this.frontLabel.text = this.backLabel.text = text;
      }
      if (frontFormat) {
         this.frontLabel.setTextFormat(frontFormat);
      }
      if (backFormat) {
         this.backLabel.setTextFormat(backFormat);
      }
      if (this.autoSize) {
         this.setSize(this.frontLabel._width, this.frontLabel._height);
      }
   }
   public function setSize(w:Object, h:Number):Void {
      if (w.toLowerCase() == "auto") {
         this.autoSize = true;
         this.setSize(this.frontLabel._width, this.frontLabel._height);
         return;
      }
      this.hitAreaRec._width = this.textMask._width = Number(w);
      this.hitAreaRec._height = this.textMask._height = h;
   }
   public function setTween(easeType:Function, duration:Number):Void {
      if (duration) {
         this.duration = duration;
      }
      if (easeType) {
         this.frontLabelTween.func = this.backLabelTween.func = easeType;
      }
   }
   private function onRollOver():Void {
      this.frontLabelTween.continueTo(this.textMask._height, this.duration);
      this.backLabelTween.continueTo(0, this.duration);
      this.broadcastMessage("onRollOver");
   }
   private function onRollOut():Void {
      this.frontLabelTween.continueTo(0, this.duration);
      this.backLabelTween.continueTo(-this.textMask._height, this.duration);
      this.broadcastMessage("onRollOut");
   }
}

Por Dankill

6 de clabLevel



 

msie7
Citar            
MensajeEscrito el 17 Mar 2009 04:52 pm
Gracias por la ayuda ya lo soluciones

Por Dankill

6 de clabLevel



 

msie7

 

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