Running 2 CCSequence's on 2 Sprite's the second sprit doesn't preform the action


#1

i have problem with CCSequence that is running action , and i dont understand why
i will be happy to know how to debug or solve the problem .
this is my code :

void Gem::setGemPositionAnimation(Gem* other)
{

      //get the current gem pos that is dragged down
      CCPoint currentToPoint = this->mySprite->getPosition();
      //get the original upper gem pos , that will be replaced with the gem which is down
      CCPoint upperOrigGemPoint  = getGemPos();
      //CCLOG("Gem %s %s upperOrigGemPoint! x:%f ,y:%f",getImageName().c_str(),getGemId().c_str(),upperOrigGemPoint.x,upperOrigGemPoint.y);
      //the down gem pos , that the upper gem suppose to go when dragged down
      CCPoint otherOrigGemPoint =  other->getGemPos();
      //CCLOG("Gem %s %s moveToPoint! x:%f ,y:%f",other->getImageName().c_str(),other->getGemId().c_str(),moveToPoint.x,moveToPoint.y);


      //down gem move up action

      CCMoveTo *moveUp = CCMoveTo::create(0.3f,upperOrigGemPoint);
      CCMoveTo *moveDown = CCMoveTo::create(0.3f,otherOrigGemPoint);

      //CCActionInterval *moveUp = CCMoveTo::create(0.3f,upperOrigGemPoint);
      //CCActionInterval *moveDown = CCMoveTo::create(0.3f,otherOrigGemPoint);
      CCSequence*  SequenceActionUpAndDown = CCSequence::create(moveUp,moveDown, NULL);
      //CCAction*  SequenceActionUpAndDown = CCSpawn::create( moveUp,moveDown, NULL);
      other->mySprite->runAction(SequenceActionUpAndDown);

      // upper gem move down action    
      CCSequence*  SequenceActionDownAndUp = CCSequence::create( moveDown,moveUp, NULL);
      //CCAction *SequenceActionDownAndUp = CCSpawn::create(moveDown,moveUp, NULL);
      mySprite->runAction(SequenceActionDownAndUp);

}

now in the SequenceActionUpAndDown CCAction the moveDown doesn’t do the animation of moving down it just jumps to its “down”( CCMoveTo *moveDown ) location
the up (CCMoveTo *moveUp) animation is working fine .
and the other gem SequenceActionDownAndUp animation is working fine .
what can be the problem ?

each gem is CCSprit on different z order


#2

the answer is , each CCSequence needs its own actions defined , same can’t be used ,
any way its worked for me