Bonjour,
Je suis en train de creer un slideshow en flash à partir d'un fichier xml et j'ai un probleme avec le redimensionnement de mes images.
Voici le 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
60
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("slides.xml");
slides_xml.ignoreWhite = true;
var w = 15;
var h = 20;
 
 
//
// Show the first slide and intialize variables
function startSlideShow(success) {
	if (success == true) {
			rootNode = slides_xml.firstChild;
			s1 = rootNode.firstChild;
			s = s1;
			s2 = s1.nextSibling;
			s3 = s2.nextSibling;
			s4 = s3.nextSibling;
			s5 = s4.nextSibling;
			s6 = s5.nextSibling;
			updateSlide(s,s1,s2,s3,s4,s5,s6);
			//cadre1(s2);
	}
}
function updateSlide(s,s01,s02,s03,s04,s05,s06) {
		imagePath = s.attributes.jpegURL;
		Path1 = s01.attributes.jpegURL;
		Path2 = s02.attributes.jpegURL;
		Path3 = s03.attributes.jpegURL;
		Path4 = s04.attributes.jpegURL;
		Path5 = s05.attributes.jpegURL;
		Path6 = s06.attributes.jpegURL;
		this.targetClip._width=80;
		this.targetClip._height=100;
		this.c1._width=w;
		this.c1._height=h;
		this.c2._width=w;
		this.c2._height=h;
		this.c3._width=w;
		this.c3._height=h;
		this.c4._width=w;
		this.c4._height=h;
		this.c5._width=w;
		this.c5._height=h;
		this.c6._width=w;
		this.c6._height=h;
		loadMovie(imagePath,this.targetClip);	
		loadMovie(Path1,this.c1);	
		loadMovie(Path2,this.c2);	
		loadMovie(Path3,this.c3);	
		loadMovie(Path4,this.c4);	
		loadMovie(Path5,this.c5);	
		loadMovie(Path6,this.c6);	
}
 
 
this.but.onRelease = function() {
	s = s.nextSibling;
	updateSlide(s,s1,s2,s3,s4,s5,s6);
};
L'initialisation donne ceci:


Lorsque j'appuie sur le bouton voici ce que j'obtiens:


Je ne comprends pas pourquoi les images changent de dimensions.
Merci pour votre aide.