title: Getting EaselJS AlphaMaskFilter to work
body: <p>I am stumped. I can't get EaselJS' AlphaMaskFilter to work. I don't think I'm doing anything wrong but it doesn't show what I'm expecting. It should look like you're pointing a flashlight at a google billboard. <a href="http://jsfiddle.net/mLn8e/" rel="nofollow">http://jsfiddle.net/mLn8e/</a></p>
  
  <pre><code>var stage = new createjs.Stage("c");
  
  var mask = new createjs.Shape();
  mask.graphics.beginRadialGradientFill(["rgba(255, 255, 255, 1)","rgba(255, 255, 255, 0)"], [0, 1], 0, 0, 0, 0, 0, 20).drawCircle(0, 0, 20);
  mask.cache(-20, -20, 40, 40);
  mask.x = 100;
  mask.y = 100;
  
  var bg = new createjs.Shape();
  bg.graphics.beginFill("#000000").rect(0, 0, 400, 400);
  
  stage.addEventListener("stagemousemove", function(e) {
      mask.x = e.stageX;
      mask.y = e.stageY;
      stage.update();
  });
  
  stage.addChild(bg, mask);
  stage.update();
  
  var img = new Image();
  img.src = "https://www.google.nl/intl/en_ALL/images/logos/images_logo_lg.gif";
  img.onload = function (e) {
      var bmp = new createjs.Bitmap(e.target);
      bmp.x = 0;
      bmp.y = 0;
  
      var amf = new createjs.AlphaMaskFilter(mask.cacheCanvas);
      bmp.filters = [amf];
  
      stage.addChild(bmp);
      stage.update();   
  };
  </code></pre>
  
  <p>The two most important lines are de var amf = ... line and the bmp.filters = [amf]; line, those two break the program.</p>
  
  <p>Thanks in advance!</p>