title: simulate click on x y coordinate
body: <p>Using JavaScript I am atempting to simulate a click. This will be performed on a flash clip swf file. Using the following code. Here is what I have come up with.</p>
  
  <pre><code>countDown = 10;
  var rollDice = setInterval(function() {
      console.log(countDown);
  
      if (countDown == 0) {
          clearInterval(rollDice);
          document.elementFromPoint(416, 825).click();
      }
      countDown--;
  }, 1000);
  </code></pre>
  
  <p>With this code I get the following error: Uncaught TypeError: Cannot call method 'click' of null.</p>