stop();
componente_array = new Array();
componente_array.push({miTitulo:"INICIO", miAccion:"sub_productos_a"});
componente_array.push({miTitulo:"LA EMPRESA", miAccion:"sub_productos_b"});
componente_array.push({miTitulo:"NOVEDADES", miAccion:"sub_productos_c"});
componente_array.push({miTitulo:"INCORPORACIÓN", miAccion:"sub_productos_d"});
componente_array.push({miTitulo:"VENTAS", miAccion:"sub_productos_e"});
componente_array.push({miTitulo:"CONTACTO", miAccion:"sub_productos_f"});
function listar() {
for (i=0; i<componente_array.length; i++) {
b = this.attachMovie("boton_componente", "boton_componente"+i, i);
b._x = -4+(b._width+1)*i;
b._y = 112.2;
b.indice = i;
b.t_txt.htmlText = componente_array[i].miTitulo;
b.b_btn.onRollOver = function() {
this._parent.gotoAndPlay("i");
};
b.b_btn.onRollOut = function() {
this._parent.gotoAndPlay("v");
};
b.b_btn.onRelease = function() {
//componente_array[i].miAccion;
_root[componente_array[this._parent.indice].miAccion]();
destildar();
this.enabled = 0;
this._parent.gotoAndStop("p");
};
}
}
listar();
//
//VARIABLES INICIALES
friccion = 2;
//
//SUB_PRODUCTOS_A
function sub_productos_a() {
getURL(inicio.html);
borrar_sub_b();
}
//
//SUB_PRODUCTOS_B
function sub_productos_b() {
borrar_sub_b();
componenteb_array = new Array();
componenteb_array.push({miTitulo:"COMPROMISO", miUrl:"emp_compromiso.html"});
componenteb_array.push({miTitulo:"LABORATORIO", miUrl:"emp_labo.html"});
componenteb_array.push({miTitulo:"DISEÑO", miUrl:"emp_pack.html"});
componenteb_array.push({miTitulo:"COMPLEJO", miUrl:"emp_complejo.html"});
componenteb_array.push({miTitulo:"ESCUELA", miUrl:"emp_esc.html"});
function listar_sub_productos() {
for (ia=0; ia<componenteb_array.length; ia++) {
ba = _root.attachMovie("boton_componente_sub", "boton_componente_sub"+ia, (ia*ia)+10);
ba._x = 125.5+(ba._width-1)*ia;
ba._y = 112;
//
ba._alpha = 0;
ba.alphafin = 100;
ba.onEnterFrame = function() {
this._alpha += (this.alphafin-this._alpha)/9;
};
//
ba.indicea = ia;
ba.t_txt.htmlText = componenteb_array[ia].miTitulo;
ba.b_btn.onRollOver = function() {
this._parent.gotoAndPlay("i");
};
ba.b_btn.onRollOut = function() {
this._parent.gotoAndPlay("v");
};
ba.b_btn.onRelease = function() {
destildar_sub_b();
miUrl;
this.enabled = 0;
this._parent.gotoAndStop("p");
};
}
}
listar_sub_productos();
}
//
//SUB_PRODUCTOS_C
function sub_productos_c() {
borrar_sub_b();
componentec_array = new Array();
componentec_array.push({miTitulo:"EVENTOS", miUrl:"nov_eventos.html"});
componentec_array.push({miTitulo:"PROMOCIONES", miUrl:"nov_promociones.html"});
componentec_array.push({miTitulo:"REGIONALES", miUrl:"nov_regionales.html"});
function listar_sub_productos() {
for (ia=0; ia<componentec_array.length; ia++) {
ba = _root.attachMovie("boton_componente_sub", "boton_componente_sub"+ia, (ia*ia)+10);
ba._x = 255+(ba._width-0.5)*ia;
ba._y = 112;
//
ba._alpha = 0;
ba.alphafin = 100;
ba.onEnterFrame = function() {
this._alpha += (this.alphafin-this._alpha)/9;
};
//
ba.indicea = ia;
ba.t_txt.htmlText = componentec_array[ia].miTitulo;
ba.b_btn.onRollOver = function() {
this._parent.gotoAndPlay("i");
};
ba.b_btn.onRollOut = function() {
this._parent.gotoAndPlay("v");
};
ba.b_btn.onRelease = function() {
destildar_sub_c();
//getURL(miUrl);
//_root[componente_array[this._parent.indice].miAccion]();
//
getURL(componentec_array[ia].miUrl);
//trace(componentea_array[ia].miUrl);
//
this.enabled = 0;
this._parent.gotoAndStop("p");
};
}
}
listar_sub_productos();
}
//
//SUB_PRODUCTOS_D
function sub_productos_d() {
getURL(incorporacion.html);
borrar_sub_b();
}
//
//
//SUB_PRODUCTOS_E
function sub_productos_e() {
getURL(ventas.html);
borrar_sub_b();
}
//
//
//SUB_PRODUCTOS_F
function sub_productos_e() {
getURL(contacto.html);
borrar_sub_b();
}
//
function destildar() {
for (b=0; b<componente_array.length; b++) {
this["boton_componente"+b].gotoAndStop(1);
this["boton_componente"+b].b_btn.enabled = 1;
}
}
//
function destildar_sub_a() {
for (b=0; b<componentea_array.length; b++) {
this["boton_componente_sub"+b].gotoAndStop(1);
this["boton_componente_sub"+b].b_btn.enabled = 1;
}
}
//
function destildar_sub_b() {
for (b=0; b<componenteb_array.length; b++) {
this["boton_componente_sub"+b].gotoAndStop(1);
this["boton_componente_sub"+b].b_btn.enabled = 1;
}
}
//
function destildar_sub_c() {
for (b=0; b<componentec_array.length; b++) {
this["boton_componente_sub"+b].gotoAndStop(1);
this["boton_componente_sub"+b].b_btn.enabled = 1;
}
}
//
//
function borrar_sub_b() {
for (b=0; b<componenteb_array.length; b++) {
removeMovieClip(this["boton_componente_sub"+b]);
}
}
