Bonjour.
Je dois créer des textfields dans une boucle afin d'afficher les coordonnées d'une polyligne près des points concernés. D'après ce que j'ai pu lire, il faut utiliser la formulation []. Mais il ne m'affiche jamais qu'un Textfield, le dernier créé, pour chaque polyligne.
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
 
while (i<iTabX.length)
	{
	this._TabTextFields[i] = this.createTextField("mySegDesc"+i,_root.getNextHighestDepth(), iTabX[i]+4,iTabY[i]+4,40,25);
	with (this["mySegDesc"+i])
		{
			multiline = true;
			wordWrap = true;
			background = true;
			backgroundColor = 0xDDDDDD;
			border = true;
			borderColor = 0x555555;
			var myFormat:TextFormat = new TextFormat();
			myFormat.color = 0x111111;
			myFormat.font = "Verdana";
			myFormat.size = 8; 
			text ="X : " + iTabX[i] + "\nY : " + iTabY[i];
			setTextFormat(myFormat); 
		}
	i++;
	}
Je ne vois pas où ça coince.
Vous avez une idée, vous ?
Merci d'avance.