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
|
gauche = 5;
haut = 5;
j = 0;
for(i=0;i<=20;i++) {
_root.valeur = "boite"+i;
var conteneur:MovieClip = this.createEmptyMovieClip(_root.valeur, this.getNextHighestDepth());
var clipLecteur:Object = new Object();
clipLecteur.onLoadInit = function(target_mc:MovieClip):Void {
trace ("chargé");
target_mc._x = gauche;
target_mc._y = haut;
target_mc._width = 100;
target_mc._height = 100;
target_mc._alpha = 50;
trace(j);
j++;
gauche = gauche+105;
if(gauche > 500) {
gauche = 5;
haut = haut+105;
}
}
clipLecteur.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
trace ("chargement");
}
var clipChargement:MovieClipLoader = new MovieClipLoader();
clipChargement.addListener(clipLecteur);
clipChargement.loadClip("image1.jpg", conteneur);
} |
Partager