title: as3 If i use fluid movements I can't hitTest Objects?
body: <p>I used the movement where you set up variables for movement in keydown.</p>
  
  <p>You set them to true if key is down.</p>
  
  <pre><code>if (event.keyCode == Keyboard.A)
          {
              bLeft = true;
          }
          if (event.keyCode == Keyboard.D)
          {
              bRight = true;
          }
          if (event.keyCode == Keyboard.W)
          {
              bUp = true;
          }
          if (event.keyCode == Keyboard.S)
          {
              bDown = true;
          }
  </code></pre>
  
  <p>And on key up you set them to false, and on enterframe you set them to move if the variables are true.</p>
  
  <p>However if I do it this way instead of the way where you set player movement at the key down, instead of using variables.</p>
  
  <p>The fluid way wouldn't work when I use hitTestObject to stop moving. If I touch the object, I just stop there and stay. I can't move back.</p>
  
  <p>I use player.vy -= speed, player.vx -= speed;</p>
  
  <p>However if I used the original, way hitTestObject would work fine.</p>
  
  <p>Hit Test for the player.</p>
  
  <p>It's inside the enterframe.</p>
  
  <pre><code>if (player.collisionArea.hitTestObject(wall0))
          {
              player.y -= vy;
          }
  </code></pre>