Llamar a dos Funciones a la vez
Hola a todos. Tengo una botonera en flash que vuando haces click en un botón despliega submenús. el código es más o menos este...
<code>
//ESTAS SON LAS FUNCIONES DE ABRIR Y CERRAR LOS BOTONES * * * *
ProductosGamaABRIR = function () {
estado_productos_de_gama = "abierto";
trace("estado del boton: " add estado_productos_de_gama);
trace("ProductosGamaABRIR");
};
ProductosGamaCERRAR = function () {
estado_productos_de_gama = "cerrado";
trace("estado del boton: " add estado_productos_de_gama);
trace("ProductosGamaCERRAR");
};
NuestrasMaquinasABRIR = function () {
estado_nuestras_maquinas = "abierto";
trace("NuestrasMaquinasABRIR");
};
NuestrasMaquinasCERRAR = function () {
estado_nuestras_maquinas = "cerrado";
trace("NuestrasMaquinasCERRAR");
};
serviciosABRIR = function () {
estado_servicios = "abierto";
trace("serviciosABRIR");
};
serviciosCERRAR = function () {
estado_servicios = "cerrado";
trace("serviciosCERRAR");
};
contactoABRIR = function () {
estado_servicios = "abierto";
trace("contactoABRIR");
};
contactoCERRAR = function () {
estado_servicios = "cerrado";
trace("ContactoCERRAR");
};
//DESDE AQUÍ HAGO LAS LLAMADAS A LAS FUNCIONES
_root.onEnterFrame = function() {
if (estado_productos_de_gama == "cerrado") {
//llama a ProductosGamaABRIR
_root.productos_de_gama.MiBoton.onRelease = ProductosGamaABRIR;
//y cierra los demás
} else {
_root.productos_de_gama.MiBoton.onRelease = ProductosGamaCERRAR;
//Llama a ProductosGamaCERRAR
}
};
stop();
</code>
Con la parte que está en negrita llamo a la función de abrir o cerrar, dependiendo del estado del botón. Mi problema es que, si tengo un botón abirto, que al clicka en uno cerrado, abrar este botón y cierre el que estaba abierto. Es decir... que en "_root.productos_de_gama.MiBoton.onRelease = " llame a las funciones de Abrir uno y cerrar los demás.
se me entiende...
GRACIAS!.