title: Problem with switch
body: <p>My problem is that I can't (don't know) make work my switch. Here in my first case, I input <code>"hache"</code>, and it doesn't pass trough. Strangely, in my <code>trace(traget);</code> [Object hache] or [Object extincteur] (depending on wich mc I click on) comes out... Why does it don't go trough the first case? I have no clue. I tried removing the " ".</p>
  
  <pre><code>package cem
  {
      import flash.display.MovieClip;
  
      public class actionObjets{
  
          /*--inventaire--*/
          private static var inventaireHache:Boolean = false;
          private static var inventaireExtincteur:Boolean = false;
  
          private var objetClique:MovieClip;
  
          public function actionObjets(target) {
              this.objetClique = target;
              switch(objetClique){
                  case "hache":
                      inventaireHache = true;
                      ajouterInventaire(objetClique);
                      break;
                  case "extincteur":
                      inventaireExtincteur = true;
                      ajouterInventaire(objetClique);
                      break;
              }
              trace(target);
          }
          private function ajouterInventaire(objetEnlever):void{
              objetClique.parent.removeChild(objetClique);
              trace(inventaireHache + " - Hache");
              trace(inventaireExtincteur + " - Extincteur");
          }
  
      }
  
  }
  </code></pre>
  
  <p>btw, target is the movieClip I clicked on a.k.a. Object extincteur, or Object hache.</p>