ON/OFF function with button

Hello !
I'm stuck on my project, please help me!
I want to do signal lights for my moped, with a button and some leds.
There is my code : I can do blinking to the led but I can't stop it...

le bouton poussoir est connecté au pin 2 pour un mode INPUT_PULLUP
la Led est connectée au pins 4 avec une résistance de 220Ω
int pinBouton, pinLed;
boolean etatAllumage;
void setup()
pinBouton = 2;
pinLed = 4;
pinMode(pinBouton, INPUT_PULLUP);
pinMode(pinLed, OUTPUT);
void loop()

if (etatAllumage) //on teste si etatAllumage est à 1
while (etatAllumage){
digitalWrite(pinLed, HIGH);//on allume la LED
digitalWrite(pinLed, LOW);
delay(500); }
if (etatAllumage=0) //sinon
while (etatAllumage=0){
digitalWrite(pinLed, LOW);} //on éteint la LED
//lecture de l'état du bouton et stockage dans etatBouton
boolean etatPinBouton
= digitalRead(pinBouton);
//test des conditions
if (!etatPinBouton)//si bouton appuyé (donc le pin indique 0 car il est en mode INPUT_PULLUP)
if (etatAllumage) //si etatAllumage à 1
etatAllumage=0; //on le passe à 0
else //sinon
etatAllumage=1; //on le passe à 1

If You post in the Forum Reading Your language the comments in the code, the names of the variables will make sence. Here most readers will not understand that info.

if (etatAllumage=0)
while (etatAllumage=0){

The below code blinks led without delay when button is pressed and stop blinking when button is released

#include <ezOutput.h> // ezOutput library

const int BUTTON_PIN = 7;
ezOutput led(9);  // create ezOutput object that attach to pin 9;

void setup() {

void loop() {
  led.loop(); // MUST call the led.loop() function in loop()

  int buttonState = digitalRead(BUTTON_PIN);

  if(buttonState == HIGH) // button is not pressed
    led.blink(500, 500); // blinking with 500 milliseconds ON, 500 milliseconds OFF
  else // button is pressed
    led.low(); // stop blinking

The above code is modification of this example: Change Blink Frequency without delay