Bonjour,

Je fait une galerie en Flash, le problème c'est mon preloader qui s'affiche a la fin du téléchargement. J'ai regardé dans ma bibliothèque que des fichier son en liaison et j'en ai pas.
Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
49
50
51
52
53
54
55
56
57
58
59
 
import mx.transitions.Tween;
import mx.transitions.easing.*;
 
 
 
largeur = 135;
hauteur = 170;
espace = 25;
nbr = 7;
 
infos = new Array();
 
largeurTotale = nbr*(largeur + espace) + espace;
 
 
this.createEmptyMovieClip("diaporama", this.getNextHighestDepth());
this.createEmptyMovieClip("photoG", this.getNextHighestDepth());
this.createEmptyMovieClip("zoom", this.getNextHighestDepth());
photoG.loadMovie("photos/grand_1.jpg");
photoG._y = 300;
diaporama._y = 10;
 
 
var myTween:Tween = new Tween(photoG, "_alpha", Strong.easeIn, 0, 100, 1, true);
var myTween:Tween = new Tween(zoom, "_alpha", Strong.easeIn, 0, 100, 1, true);
 
 
for(var i = 1; i <= nbr; i++) {
 	var imageCourrante=  i + ".jpg";
	var mc = diaporama.createEmptyMovieClip("photo"+i, i);
 
	mc._x = espace + (largeur + espace)*i;
	mc.createEmptyMovieClip("conteneur", this.getNextHighestDepth());
	mc.conteneur.loadMovie("photos/" +imageCourrante);
	zoom.loadMovie("photos/Lesjeunes.jpg");
	zoom._y = 200;
 
 
	var myTween:Tween = new Tween(mc, "_alpha", Strong.easeIn, 0, 50, 1, true);
 
	mc.nombre = i
	infos[i] = imageCourrante;
 
	mc.onRollOver = function() {
		var myTween:Tween = new Tween(this, "_alpha", Strong.easeOut, 0, 100, 1, true);
		photoG.loadMovie("photos/grand_"+infos[this.nombre]);
		var myTween:Tween = new Tween(photoG, "_alpha", Strong.easeIn, 0, 100, 0.5, true);
	}
 
	mc.onRollOut = function() {
		var myTween:Tween = new Tween(this, "_alpha",   Strong.easeOut, 0,50, 1, true);
	}
 
}
 
onMouseMove = function() {
	diaporama._x = (500 - largeurTotale)/500*_xmouse;
}
Je veux savoire si c'est un proble me de la fonction loadMovie.

Le code de chargement :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
 
stop(); //arrêt du scénario
 
myInterval = setInterval(preload,100); // création d'un intervalle où la fonction est appelée preload
function preload() { //ici, on définit ce que fait la fonction preload
        var current = _root.getBytesLoaded(); //la variable current va être égale au nombre d'octets chargés
 
        var total = _root.getBytesTotal(); // la variable total va être égale au nombre d'octets qu'il y a à charger
 
        var pctLoaded = Math.round(current/total*100); //notre variable pctLoaded sera une équation mathématique. Le calcul donne notre pourcentage
 
        bar_mc._xscale = pctLoaded; //Ici, la longueur de notre barre s'allonge sur l'axe des X selon le pourcentage
 
	   pourcent.text = "Loading "+pctLoaded +" %"; //pct_txt, soit notre "100" où pct_txt est le nom d'occurrence, sera un texte qui sera égal à pctLoaded, donc  à notre pourcentage
 
        if (current == total) { // si tous les octets sont chargés (c'est la condition)
                gotoAndStop(3); // Va jouer notre séquence "main", notre animation
                clearInterval(myInterval); //et supprime l'intervalle
        } //fermeture de notre condition
 
} //fermeture de notre fonction