Hi there / nothing happens with my buttons
Hi there,
nothing happens with my buttons. No syntax error.
I have 2 files : the first was supposed to call the other one when i ask for the clients with milles points.
FIRST FILE.AS
package {
import flash.display.*;
import flash.text.*;
import flash.events.*;
public class U1A7_Fidelisation extends MovieClip {
var affichage:String="";
var saisieU:int;
var saisieD:int;
var saisieT:int;
var saisieQ:int;
// Déclarer un tableau servant à stocker les adhérents et leurs milles
var adherent:Array = new Array();
public function U1A7_Fidelisation() {
ajtAdherent.addEventListener(MouseEvent.CLICK, ajouter);
afficheAdherent.addEventListener(MouseEvent.CLICK, afficher);
supAdherent.addEventListener(MouseEvent.CLICK, supprimer);
//afficheTotalMilles.addEventListener(MouseEvent.CLICK, affichertotal);
include "U1A7_Milles.as"
}
function afficher(event:MouseEvent):void {
for (var i=0; i<adherent.length; i++) {
affichage += ("Adhérent # " + i + " = " + adherent + "\n");
}
sortiemilles.text=affichage;
}
// Fonction pour réagir à un clic sur btnAjouter.
function ajouter(event:MouseEvent):void {
adherent.push(saisieNom.text);
}
function supprimer(event:MouseEvent):void {
var indiceNom:int;
indiceNom = (adherent.indexOf(saisieNom.text));
if (indiceNom!=-1) {
for (var i=indiceNom; i<adherent.length; i++) {
adherent=adherent[i+1];
}
adherent.pop();
}
}
}
}
SECOND FILE.AS
var adherent1:Array = ["Jaime Voyager",330,1700,1500,220];
var adherent2:Array = ["Paul Avion",750,1700,1500,800];
var adherent3:Array = ["Amelia Earhart",2000,4000,3000,1000];
var adherent:Array = [adherent1,adherent2,adherent3];
This is the capture. Tks a lot.
T
