var myNavi=new Array();
myNavi[0]="contact";
myNavi[1]="links";
myNavi[2]="home";
myNavi[3]="about";
myNavi[4]="stores";
myNavi[5]="projects";
myNavi[6]="customers";
myNavi[7]="login";
var yAbstand=30; // horizontaler Abstand
var myX=5;
var myY=0;
var myAlpha=160; // Breite der Ausblendfläche / Tranzparenz
var i;
var hoehe=100; // korrekte Bühnenhöhe
var breite=120; // korrekte Bühnenbreite
var tempo=0; // Scrollgeschwindigkeit
var maxtempo=1; // maximale Scrollgeschwindigkeit
var Ausblenden=true; // Steuerung, ob Movieclips ausgeblendet werden sollen
var myLevel=1;
var i=0;
var Anzahl=myNavi.length-1;
var hoehe=Anzahl*yAbstand;
var myAlpha=hoehe/2;
Initialisieren();
/*
// Dynamik Scrollfunktionen
*/
function Animation(){
//befindet sich der Mauszeiger innerhalb der Bühne ?
if(_root._ymouse>=0 and
_root._ymouse<hoehe and
_root._xmouse>0 and
_root._xmouse<=breite){
//Scroll-Richtung abhängig von Mausposition
if(_root._ymouse>=(hoehe/2)){
// Geschwindigkeit abhängig von Distanz Mauscursor zur Mitte
tempo=(_root._ymouse*maxtempo/(hoehe/2)-maxtempo);
HochScrollen();
}else{
// Geschwindigkeit abhängig von Distanz Mauscursor zur Mitte
tempo=(maxtempo-_root._ymouse*maxtempo/(hoehe/2));
RunterScrollen();
}
}else{
tempo=0;
}
// updateAfterEvent();
}
/*
// Tranzparenz
*/
function Tranzparenz(){
// Ausblenden erwünscht ?
if(Ausblenden==true){
// Tranzparenz oben
if(this["mc_"+i]._y<myAlpha){
this["mc_"+i]._alpha=(100/myAlpha)*this["mc_"+i]._y;
this["mc_"+i]._xscale=(100/myAlpha)*this["mc_"+i]._y;
this["mc_"+i]._yscale=(100/myAlpha)*this["mc_"+i]._y;
}
// Keine Tranzparenz
if(this["mc_"+i]._y>=myAlpha and
this["mc_"+i]._y<=hoehe-myAlpha){
this["mc_"+i]._alpha=100;
this["mc_"+i]._xscale=100;
this["mc_"+i]._yscale=100;
}
// Tranzparenz unten
if(this["mc_"+i]._y>hoehe-myAlpha){
this["mc_"+i]._alpha=100/myAlpha*(hoehe-this["mc_"+i]._y);
this["mc_"+i]._xscale=100/myAlpha*(hoehe-this["mc_"+i]._y);
this["mc_"+i]._yscale=100/myAlpha*(hoehe-this["mc_"+i]._y);
}
}
}
/*
// Logos nach oben Scrollen
*/
function HochScrollen(){
// Bewegung
for(i=0;i<=Anzahl;i++){
if (this["mc_"+i]._y+yAbstand>0){
this["mc_"+i]._y=this["mc_"+i]._y-tempo;
}else{
this["mc_"+i]._y=this["mc_"+i]._y+((Anzahl+1)*yAbstand) - tempo;
}
Tranzparenz();
}
}
/*
// Elemente nach unten Scrollen
*/
function RunterScrollen(){
for(i=0;i<=Anzahl;i++){
if (this["mc_"+i]._y<hoehe){
this["mc_"+i]._y=this["mc_"+i]._y+tempo;
}else{
this["mc_"+i]._y=this["mc_"+i]._y-((Anzahl+1)*yAbstand)+tempo;
}
Tranzparenz();
}
}
/*
// Bühne bei Start initialisieren und benötigte Objekte erzeugen
*/
function Initialisieren(){
// LabelMovieClips in HauptMovieClip laden und darstellen
for(i=0;i<=Anzahl;i++){
this.attachMovie("mc_Navi","mc_"+i,i);
this["mc_"+i]._y = myY;
this["mc_"+i]._x = myX;
this["mc_"+i].txtLink.text=myNavi[i];
// i auf index setzen zur korrekten Verarbeitung im Link !
this["mc_"+i].id=i;
// Animation darstellen
this["mc_"+i].onEnterFrame=function(){
Animation();
}
// Funktion bei Mausklick einbauen
this["mc_"+i].onPress=function(){
trace(this.id);
};
// Ausblenden erwünscht ?
if(Ausblenden==true){
// Tranzparenz oben
if(this["mc_"+i]._y<myAlpha){
this["mc_"+i]._alpha=(100/myAlpha)*this["mc_"+i]._y;
this["mc_"+i]._xscale=(100/myAlpha)*this["mc_"+i]._y;
this["mc_"+i]._yscale=(100/myAlpha)*this["mc_"+i]._y;
}
// Keine Tranzparenz
if(this["mc_"+i]._y>=myAlpha and
this["mc_"+i]._y<=hoehe-myAlpha){
this["mc_"+i]._alpha=100;
this["mc_"+i]._xscale=100;
this["mc_"+i]._yscale=100;
}
// Tranzparenz unten
if(this["mc_"+i]._y>hoehe-myAlpha){
this["mc_"+i]._alpha=100/myAlpha*(hoehe-this["mc_"+i]._y);
this["mc_"+i]._xscale=100/myAlpha*(hoehe-this["mc_"+i]._y);
this["mc_"+i]._yscale=100/myAlpha*(hoehe-this["mc_"+i]._y);
}
}
myY=myY+yAbstand;
i
}
}