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 46 47 48
|
transparant[i].onPress = function():Void {
switch (this.numero) {
case "1" :
presentation = attachMovie("presentation", "presentation", 300);
presentation._x = 200;
presentation._y = 300; cache = attachMovie("cache", "cache", 299);
cache._x = 0;
cache._y = 0; break;
case "2" :
function initialiseVignette(cible:MovieClip, listeVignette:Array):Void {
var chargeurImage:Array = new Array(listeVignette.length);
var ecouteur:Object;
for (var i:Number = 0; i<listeVignette.length; i++) {
listeVignette[i] = cible.attachMovie("PhotoClp", cible+""+i, cible.getNextHighestDepth());
chargeurImage[i] = new MovieClipLoader();
chargeurImage[i].loadClip("photos/apercu"+i+".gif",listeVignette[i]);
listeVignette[i]._x = i*listeVignette[i]._width;
listeVignette[i]._y = 0;
ecouteur = new Object();
ecouteur.numero = i;
chargeurImage[i].addListener(ecouteur);
ecouteur.onLoadComplete = function(cible:MovieClip) {
cible.numero = this.numero;
cible.onRollOver = function():Void {
this._alpha = 30;
};
cible.onRollOut = function():Void {
this._alpha = 100;
};
cible.onPress = function():Void {
creerLightBox(this.numero);
};
};
}
} break;
case "3" :
break;
case "4" :
break;
}
}; |
Partager