Copy link to clipboard
Copied
Hi there,
I don't know what i did wrong.
This is my code and the screen. When i click on "trier", i can see only few big letters.
Tks forour help.
The second image is how i was suppose to get the list.
package {
import flash.display.*;
import flash.text.*;
import flash.events.MouseEvent;
import fl.controls.List;
public class U2A2_ElevesGestion extends MovieClip {
var eleve:Array = new Array();
var liste:String;
public function U2A2_ElevesGestion() {
btnLister.addEventListener(MouseEvent.CLICK, lister);
btnTrier.addEventListener(MouseEvent.CLICK, trier);
btnAjout.addEventListener(MouseEvent.CLICK, ajouter);
btnSupprimer.addEventListener(MouseEvent.CLICK, supprimer);
include "U2A2_ElevesListe.as"
}
function lister(event:MouseEvent):void {
liste="";
for (var i=0; i<eleve.length; i++)
{
liste = liste + ("Élève [" + i + "] : " + eleve + "\n");
}
affichage.text = liste;
}
function trier(event:MouseEvent):void {
eleve.sort();
}
function ajouter(event:MouseEvent):void {
eleve.push(txtSaisieNomEleve.text);
}
function supprimer(event:MouseEvent):void {
var indiceEleve:int;
indiceEleve =(eleve.indexOf(txtSaisieNomEleve.text));
if (indiceEleve != -1)
{
for (var i=indiceEleve; i <eleve.length; i++)
{
eleve = eleve[i+1];
}
eleve.pop();
}
}
}
}
Copy link to clipboard
Copied
my first guess is check the text field the data is populating that the font size didnt accidently increase. Other then that I'd say investigate this include file U2A2_ElevesListe.as in your code, it might be stemming from that as file