Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Hi there / nothing happens with my buttons

New Here ,
May 13, 2014 May 13, 2014

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.

Capturemilles.JPG

T

TOPICS
ActionScript
179
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 13, 2014 May 13, 2014
LATEST

Use the trace() function inside the event handler functions to see if your event handler functions are being processed when you click the buttons.  Then use them to trace the processing within the functions to see if/why things are not processing as you expect them to.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines