Foros del Web » Creando para Internet » Flash y Actionscript »

Repetir menú de código

Estas en el tema de Repetir menú de código en el foro de Flash y Actionscript en Foros del Web. Hola, tengo un menú hecho con este código: Código: // Attaching the glow menu to the stage var a=this.attachMovie("glowmenu","menu",10); a._x = 54; a._y = 45; ...
  #1 (permalink)  
Antiguo 04/08/2009, 12:21
 
Fecha de Ingreso: noviembre-2008
Mensajes: 47
Antigüedad: 15 años, 5 meses
Puntos: 0
Repetir menú de código

Hola, tengo un menú hecho con este código:

Código:
// Attaching the glow menu to the stage
var a=this.attachMovie("glowmenu","menu",10);
a._x = 54;
a._y = 45;

// Setting font settings of the menu
a.font = "dearJoe four";
a.bold=false;
a.italic=false;
a.size = 33;
a.embedFonts=true;

// Setting color and glow settings of the menu
a.overAlpha=100;
a.outAlpha=60;
a.textColor=0xFFFFFF;
a.glowColor=0xFFFFFF;
a.glowAmount=9;

// Enabling keeping the button active when clicked, having a first active button
a.clickActive = false;
a.activeColor=0xFFFFFF;

// Here is the check whether a flashvar named 'preActive' is set to a value in order to have
// a button already in active state when the menu is loaded. The first part of the if statement checks
// for a external variabel, the second part you can set manually, currently it is set to 2
if(this.preActive!=undefined){
	a.clickActive=true;
	a.preActive=this.preActive;
}else{
	//a.preActive=2;
}

// Setting menu settings
a.menuAlign="vertical";
a.vAlign="left";
a.vSpacing = 17;
a.hSpacing=5;

// Adding sounds to the menu
a.overSound="tic";
a.clickSound="";

// Setting the xml reference and starting the menu
a.xml_unique=false;
a.xmlref="menu.xml";
a.startClip();

// This is the function that is executed when a button is pressed. The variable 'ref' and 'tgt'
// in this function will be set to the values that you've used in the XML file or arrays.
// You can add the right actions simply by having an if statement checking the values
this.goRef=function(ref,tgt){
	trace("ref= "+ref);
	if(ref=="1"){
		gotoAndStop(10); 
	}
	if(ref=="2"){
		gotoAndStop(15); 
	}
	if(ref=="3"){
		gotoAndStop(20); 
	}
	if(ref=="4"){
		gotoAndStop(25); 
	}
	if(ref=="5"){
		gotoAndStop(30); 
	}
	if(ref=="6"){
		gotoAndStop(35); 
	}
	if(ref=="7"){
		gotoAndStop(40); 
	}
		if(ref=="8"){
		gotoAndStop(45); 
	}
}
El caso es que quiero tener dos, uno al lado del otro pero no sé cómo duplicarlo!!! Alguna idea? Gracias,

Roger.

Última edición por jmontes_maldonado; 04/08/2009 a las 12:25 Razón: Código mal puesto
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:08.