try preserving the action in an instance variable. In the header file have a pointer declared
CCAction* myAction;
then when the layer or sprite is initialized
myAction = [CCAnimate actionWithAnimation:myAnimation];
From what point on, whenever you want to call your action do
if( [action isDone] ){
[mySprite runAction: myAction];
}
I think the reason your app is crashing is because you are calling an action that only exists for the duration of the method in which it is initialized.
Im my game i use CCSequences (so i can use CCCallFunc to set/declare variables mid animation), all these CCSequences are stored as instance variables in my CCSprite subclass.
I have an idle animation that repeats for ever.
Whenever I want to 'jump' for instance i call
[self stopAllActions];
[self runAction:jumpSeq];
My jumpSeq is a CCSequence that plays a jump animation, and has a CCCallFunc at the end of the sequence that restarts the idle animation when it is done.
Hope this helps.
Further reading: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:actions_special?s[]=cccallfunc