Bonjour à tous,

J'utilise un mx:List pour afficher une liste d'individu et un custom renderer pour afficher le tout de façon sympa.
Ce renderer utilise entre autre un mx:Image qui est la photo de l'individu...
Jusque là tout va bien

Mon problème :

Lorsque je scroll verticalement la liste, les images ne se rafraichissent pas correctement et toto se retrouve avec la photo de tata !

Voyez vous d'où pourrait venir mon problème ?

Ci-dessous le code de mon renderer :

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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="88"
	creationComplete="init();"
	verticalScrollPolicy="off" horizontalScrollPolicy="off" borderColor="#B7B7BC" borderStyle="none">
 
	<mx:Script>
		<![CDATA[
			import mx.controls.Alert;
			import mx.controls.List;
 
			[Bindable]
			private var imagePath:String;
 
			private var loader:URLLoader = new URLLoader();
 
			private function init():void{
 
				if (this.data!=null){
 
					lblAdressePerso.text = data.adresseperso1_ressource;
 
					if ((data.adresseperso2_ressource)!=null){
						lblAdressePerso.text+= " " + data.adresseperso2_ressource;  
					}
 
					if ((data.postalperso_ressource)!=null){
						lblAdressePerso.text+= " - " + data.postalperso_ressource;  
					}
 
					if ((data.villeperso_ressource )!=null){
						lblAdressePerso.text+= " " + data.villeperso_ressource ;  
					}
 
					var requestURL:URLRequest = new URLRequest("_images/trombi/IMG_" + data.id_ressource + ".jpg");
					loader.addEventListener(Event.COMPLETE,loaderHandler);
					loader.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHandler);
					loader.load(requestURL);
 
				}
 
			}
 
			private function loaderHandler(success:String):void{
 
				if (success){
					imagePath = "_images/trombi/IMG_" + data.id_ressource + ".jpg";
				}
 
			}
 
			private function ioErrorHandler(event:IOErrorEvent):void{
					imagePath = "_images/trombi/IMG_NOBODY.png";
			}
 
 
			private function SupprCollaborateur(event:MouseEvent):void{
 
				Alert.show(data.id_ressource);
 
			}
 
		]]>
	</mx:Script>
 
	<mx:Image width="68" height="68" left="10" top="10" source="{imagePath}"/>
 
	<mx:Label text="{data.prenom_ressource} {data.nom_ressource}" id="lblNomPrenom" left="86" right="33" y="12" fontWeight="bold" fontSize="12"/>
 
	<mx:Label text="{data.mail_ressource}" id="lblMailPro" left="86" right="10" y="36"/>
 
	<mx:Label text="" id="lblAdressePerso" left="86" right="187" y="58"/>
	<mx:Image id="picSuppr" source="@Embed('assets/button_cancel.png')" scaleContent="true" width="15" height="15" right="10" top="10" toolTip="Supprimer le collaborateur ?" useHandCursor="true" buttonMode="true" click="SupprCollaborateur(event)"/>
 
</mx:Canvas>
Merci d'avance