title: Reset Drag and Drop Game - ActionScript 3 - Flash
body: <p>I am working on a Drag and Drop game in ActionScript 3.</p>
  
  <p>When I click for a new game, the objects stay matched, not in their original position. </p>
  
  <p>How to reset its positions when a new game starts?</p>
  
  <pre><code>var dragArray:Array = [square_word, circle_word, triangle_word];
  var matchArray:Array = [squareMatch, circleMatch, triangleMatch];
  var posArray:Array = [ {x:276, y:207}, {x:443, y:207}, {x:107, y:207} ];
  
  var dragGame:DragGame = new DragGame(stage, dragArray, matchArray, posArray);
  
  dragGame.addEventListener(DragGame.MATCH_MADE, onMatch);
  dragGame.addEventListener(DragGame.NO_MATCH, onFlub);
  dragGame.addEventListener(DragGame.ALL_DONE, onDone);
  
  function onMatch(event:Event):void {
  var matchSound:Sound = new MatchSound();
  matchSound.play();
  }
  function onFlub(event:Event):void {
  var flubSound:Sound = new FlubSound();
  flubSound.play();
  }
  function onDone(event:Event):void {
  var applause:Sound = new Applause();
  applause.play();
  }
  </code></pre>