title: Java ME. How to animate Sprite
body: <p>I am having trouble with animating my sprite in Java ME.</p>
  
  <pre><code>   if ((k &amp; FIRE_PRESSED) != 0) {
          spriteActive = true;
          boxer.nextFrame();
          if (boxer.getFrame() == boxer.getFrameSequenceLength() - 6) {
              spriteActive = false;
          }
      }
  }
  
      // TO re-start a game...
  
      public void update() {
          if(boxer.getRawFrameCount() == 5 &amp;&amp; spriteActive == false){
              boxer.setFrame(0);
          }
  
      }
  </code></pre>
  
  <p>When the enter key is pressed, spriteActive is set true but only changes the frame by one. I intend to have it animating the entire sequence but it is not doing that. Just animates 1 frame at a time with every press.</p>
  
  <p>Does anyone have any ideas/advice of how I should approach this?</p>
  
  <p>Thanks for the time and help! </p>