1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| label=["Accueil","Expérience","Médias","Autres domaines","Etude de cas"];
lien=["home.swf","","","","",""];
if(ini==null){
ini=true;
last_c=btn1;
last_f=_currentframe;
}
frame=_currentframe;
for(i=0;i<label.length;i++){
this["btn"+Number(i+1)].id=i;
this["btn"+Number(i+1)].onRelease=function(){
if(lien[this.id]!=""){
_root.contents.loadMovie(lien[this.id]);
gotoAndStop("Accueil");
last_c=this;
last_f=frame;
ini_col();
}
}
this["btn"+Number(i+1)].onRollOver=function(){
if(label[this.id]!=""){
gotoAndStop(label[this.id]);
}
}
ini_col();
}
function change_col(cib){
cib.color = new Color(cib);
cib.color.setTransform({ga: 75});
}
function ini_col(){
for(j=0;j<label.length;j++){
if(this["btn"+Number(j+1)]==last_c&&frame==last_f){
this["btn"+Number(j+1)].enabled=false;
change_col(this["btn"+Number(j+1)]);
}else{
this["btn"+Number(j+1)].enabled=true;
this["btn"+Number(j+1)].ini_col=new Color(this["btn"+Number(j+1)]);
this["btn"+Number(j+1)].color.setTransform({ga:100});
}
}
} |