title: Javascript Classes Property not being read
body: <hr>
  
  <p>The properties <code>x,y,width,height</code> are not being read! When I do <code>.drawImage()</code>, <code>this.x, this.y, this.width, this.height</code> are not being used!</p>
  
  <p>Say I changed the <code>x</code> the image won't change its position. However, if I <code>alert(this.x)</code> or any variable, then it will print out the correct value.</p>
  
  <p>Thanks for the community help!</p>
  
  <pre><code>var Enemy = function(word, x, y, width, height) {
  
    this.word = word;
  
    //Position of the Enemy Spawn
    this.x = x;
    this.y = y;
    this.width = width;
    this.height = height;
  }
  Enemy.prototype.draw = function() {
    var image = new Image();
    image.onload = function() {
      Context.context.drawImage(image, this.x, this.y, this.width, this.height)
    };
    image.src = "enemy.png"
    // If I do alert(this.x), it returns the correct value!!!
  }
  </code></pre>
  
  <p>This is the initialization:</p>
  
  <pre><code>var myEnemy = new Enemy("TestEnemy", 100, 100, 100, 100);
  myEnemy.draw();
  </code></pre>
  
  <hr>