rootNavi = ["a", "b", "c", "d", "e"];
navi_0 = ["Urnenkandernenwagen", "Aufbahrungsleuchter"];
navi_1 = ["Urn", "Auf"];
navi_2 = ["Var", "n", "Ussskan"];
navi_3 = ["Internet", "s", "Auf"];
navi_4 = ["Varirnet", Sr", "Aur"];
navi_5 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_6 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_7 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_8 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_9 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_10 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_11 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_12 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_13 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_14 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_15 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_16 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
navi_17 = ["K1","K2","R1", "Rt2", "Rt3", "R4", "R5"];
//functions aufruf
table(rootNavi);
//functionen
function table(arr_nam) {
// spaltenanzahl
columnsCount = 1;
// horizontale Schrittweite
hspace = 19;
// vertikale Schrittweite
vspace = 19;
// Erzeuge Gitter
trace(typeof(arr_nam));
for (i=0; i<arr_nam.length; i++) {
item_mc = _root.emp.attachMovie("navi", "item"+String(i), "1"+i);
item_mc._x = 4+(i%columnsCount)*hspace;
item_mc._y = 4+Math.floor(i/columnsCount)*vspace;
_root.emp["item"+[i]].txt.text = arr_nam[i];
//id erzeugen
_root.emp["item"+[i]].id = i;
_root.emp["item"+[i]].btn.onRollOver = function() {
_root.emp["item"+[this._parent.id]].gotoAndPlay('on');
};
_root.emp["item"+[i]].btn.onRollOut = function() {
_root.emp["item"+[this._parent.id]].gotoAndPlay('no');
};
_root.emp["item"+[i]].btn.onPress = function() {
_root.emp["item"+[this._parent.id]].gotoAndPlay('die');
};
_root.emp["item"+[i]].btn.onRelease = function() {
//trace(this._parent.id);
//trace(["navi_"+[this._parent.id]]);
for (r=0; r<i; r++) {
_root.emp["item"+[r]].bg._visible = 1;
}
_root.header.headline.text = arr_nam[this._parent.id];
_root.emp["item"+[this._parent.id]].bg._visible = 0;
//subnav
table_sub(eval( "navi_" + this._parent.id ));
};
}
}
//
//subnavi
//
function table_sub(arr_sub) {
// spaltenanzahl
spaltenCount = 2;
// horizontale Schrittweite
hospace = 103;
// vertikale Schrittweite
vespace = 19;
// Erzeuge Gitter
for (z=0; z<arr_sub.length; z++) {
con_mc = _root.sub.attachMovie("sub_reiter", "con"+String(z), "2"+z);
con_mc._x = (z%spaltenCount)*hospace;
con_mc._y = Math.floor(z/spaltenCount)*vespace;
_root.sub["con"+[z]].txt.text = arr_sub[z];
_root.sub["con"+[z]].idz = z;
_root.sub["con"+[z]].btn.onRollOver = function() {
_root.sub["con"+[this._parent.idz]].bg._alpha = 70;
};
_root.sub["con"+[z]].btn.onRollOut = function() {
_root.sub["con"+[this._parent.idz]].bg._alpha = 100;
};
_root.sub["con"+[z]].btn.onPress = function() {
_root.sub["con"+[this._parent.idz]].bg._alpha = 50;
};
_root.sub["con"+[z]].btn.onRelease = function() {
//trace(this._parent.id);
for (rz=0; rz<z; rz++) {
_root.sub["con"+[rz]].bg._visible = 1;
}
_root.sub["con"+[this._parent.idz]].bg._visible = 0;
//_root.header.headline.text=arr_nam[this._parent.id];
};
}
}
//table_sub(rootNavi);
//
//
//slide
function slide_up() {
this._y -= (-280+this._y)/5;
}
function slide_down() {
this._y -= (-432+this._y)/5;
}
//navi_too
_root.attachMovie("navi_too", "navi_too", 2);
_root.onEnterFrame = function() {
if (_root.emp._height>0) {
//trace(_root.emp._height);
_root.navi_too._y = _root.emp._height+29;
delete this.onEnterFrame;
}
};
//impressum unsichtbar
_root.impressum._visible = 0;
_root.preisAnsicht._visible = 0;
//navi_too btn
_root.navi_too.impressum.onRelease = function() {
_root.impressum._visible = 1;
_root.preisAnsicht._visible = 0;
};
_root.impressum.close_btn.onRelease = function() {
_root.impressum._visible = 0;
};
_root.navi_too.preisAnfrage.onRelease = function() {
_root.preisAnsicht._visible = 1;
_root.impressum._visible = 0;
};
_root.preisAnfrage.onRelease = function() {
_root.preisAnsicht._visible = 1;
_root.impressum._visible = 0;
};
_root.preisAnsicht.close_btn.onRelease = function() {
_root.preisAnsicht._visible = 0;
};
_root.preisAnsicht.close_btn1.onRelease = function() {
_root.preisAnsicht._visible = 0;
};
//header btn
_root.header.btn.onRelease = function() {
trace("apha function ;)");
};
//subnavi
_root.sub.attachMovie("navi_sub", "navi", 3);
//artikelbeschreibung
_root.artikelbeschreibung.r._visible = 0;
_root.artikelbeschreibung.r_btn._visible = 0;
_root.artikelbeschreibung.h_btn.onRelease = function() {
_root.artikelbeschreibung.onEnterFrame = slide_up;
//
_root.artikelbeschreibung.h._visible = 0;
_root.artikelbeschreibung.h_btn._visible = 0;
//
_root.artikelbeschreibung.r._visible = 1;
_root.artikelbeschreibung.r_btn._visible = 1;
};
_root.artikelbeschreibung.r_btn.onRelease = function() {
_root.artikelbeschreibung.onEnterFrame = slide_down;
//
_root.artikelbeschreibung.r._visible = 0;
_root.artikelbeschreibung.r_btn._visible = 0;
//
_root.artikelbeschreibung.h._visible = 1;
_root.artikelbeschreibung.h_btn._visible = 1;
};