title: How to change or replace animation while sprite is running action and animation
body: <p>I am using Cocos2D and SneakyInput Joystick to make a fighting game.
  I have a character and some animation for this character. (walkAnim, attackAnim, jumpAnim... etc)</p>
  
  <p>I want to do something like: When I press jumpButton, the character will run ccjumpby and jumpAnim. </p>
  
  <p>While character is jumping, I press attackButton to make the character run attackAnim and the character is still running ccjumpby.</p>
  
  <p>Without attackbutton, the character is still run jumpAnim and ccjumpby.</p>
  
  <p>All I want to do is just like "street fighter".</p>
  
  <p>In character.m, I have:</p>
  
  <pre><code>- (void) jumpButtonPress {
      id action = nil;
      id movementAction = nil;
      CGPoint newPosition;
      newPosition = ccp(screenSize.width * 0.2f, 0.0f);
      if ([self flipX] == YES) {
          newPosition = ccp(newPosition.x * -1.0f, 0.0f);
      } 
      movementAction = [CCJumpBy actionWithDuration:1.5f 
                                         position:newPosition 
                                           height:160.0f 
                                            jumps:1];
      action = [CCSequence actions:
                        [CCAnimate 
                         actionWithAnimation:crouchingAnim 
                         restoreOriginalFrame:NO],
                        [CCSpawn actions:
                         [CCAnimate 
                          actionWithAnimation:jumpingAnim 
                          restoreOriginalFrame:YES],
                         movementAction,
                         nil],
                        [CCAnimate 
                         actionWithAnimation:afterJumpingAnim 
                         restoreOriginalFrame:NO],
                        nil];
      [self runAction:action];
  }
  
  - (void) attackButtonPressed {
      action = [CCAnimate 
                            actionWithAnimation:rightPunchAnim 
                            restoreOriginalFrame:NO];
      [self runAction:action];
  }
  </code></pre>
  
  <p>This is not working.</p>