bonsoir,
je voudrais charger des images via la methode loadClip. Cela fonctionne très bien en 'dur' mais pas du tout avec l'intevention d'un fichier XML.
Voila le code correspondant:
Apparament ce serait a cause des this dans la boucle. J'ai essayé de remplacer par des _root mais ca ne marche pas non plus...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 myPhoto = new XML(); myPhoto.ignoreWhite = true; myPhoto.onLoad = function(success) { numimages = this.firstChild.childNodes.length; for(i=0; i<=numimages; i++){ this.noeudCourrant = this.firstChild.childNodes[i]; var monClip:MovieClip = this.createEmptyMovieClip("conteneur"+i, i); //clip conteneur var mcl:MovieClipLoader = new MovieClipLoader(); //gestionnaire du chargement mcl.loadClip(this.noeudCourrant.attributes.chemin, monClip); //chargement de la photo dans monClip }; } myPhoto.load("galerie.xml");
Par contre ce code marche avec loadMovie mais pour la suite j'ai besoin de passer par movieclipLoader.......
marci d'avance pour votre aide
Partager