Multi Animation [cocos2dx]

I have a class object with multi object :
@
spritebatch = CCSpriteBatchNode::create("Blue.pvr"); m_pSprite1 = CCSprite::createWithSpriteFrameName("Blue_1.png"); m_pSprite1->setPosition(CCPoint(300.0f, 200.0f)); spritebatch->addChild(m_pSprite1); m_Layer->addChild(spritebatch);

CCArray *idleAnimFrames = CCArray::createWithCapacity(10);
idleAnimFrames~~>retain;
for
{
CCSpriteFrame frame = CCSpriteFrameCache::sharedSpriteFrameCache~~>spriteFrameByName~~>getCString);
idleAnimFrames~~>addObject;
}
CCAnimation idleAnimation = CCAnimation ::createWithSpriteFrames) ;
CCArray
bigAnimFrames = CCArray::createWithCapacity;
bigAnimFrames~~>retain;
for
{
CCSpriteFrame
frame = CCSpriteFrameCache::sharedSpriteFrameCache~~>spriteFrameByName~~>getCString);
idleAnimFrames~~>addObject;
}
CCAnimation *bigAnimation = CCAnimation ::createWithSpriteFrames) ;
this~~>m_actionIdle = CCRepeatForever::create);
this~~>m_actionBigger = CCRepeatForever::create(CCAnimate::create(bigAnimation));

m_pSprite1->runAction(m_actionIdle);
Init();

@

In touch method of helloworldscence
`@ CCTouch* touch = (CCTouch*)( touches->anyObject() );
CCPoint location = touch->getLocationInView();

location = CCDirector::sharedDirector()->convertToGL(location);
if(m_BlueBall->getRect(location))
{
    m_BlueBall->m_pSprite1->stopAction(m_actionIdle);
    m_BlueBall->m_pSprite1->runAction(m_actionBigger);
}

// Set up initial location of projectile
CCSize winSize = CCDirector::sharedDirector()->getWinSize();

`
@
Animation Idle run normally, but when i touch to call second animation, error:" thread 1: signal SIGABRT" in :

@ void CCObject ::retain(void) CCASERT(m_uReference > 0, "reference count should greater than 0 ");@

Please use tag for preformated text (word pre in angle brackets) instead code tag when you post your code. As for the SIGABRT in handling touch I noticed that you did not retain m_actionBigger. Your code: this->m_actionBigger = CCRepeatForever::create(CCAnimate::create(bigAnimation)); is creating an autoreleased object.

So CCaction is auto released object?? (sorry about my bad english)

new to cocos2dx, I’ve met the same problem yes-today, wasted 3hours. T_T Have u fixed it?

Yes, you have to retain it after create

Yes, all cocos2d-x objects created with static create methods (CCClassName::create(…)) are autoreleased objects. There is a short tutorial about this on wiki: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Reference_Count_and_AutoReleasePool_in_Cocos2d-x

Thanks for your help, so i want to know one question, every action must be release in destructor ???

If you retain it then yes, you should release it in destructor.

yeah, so can u help one more time
if i have two action:
ccaction * a;
ccaction * b:
how t use ccsequence to run two ccaction.
i find how to use : CCFiniteTimeAction* seq = CCSequence::actions(a,b, NULL);
but maybe ccsequence ::actions doesn’t exist in cocos2dx 2.x
thank u so much

Try CCSequence::create(a, b, NULL);

i think it can’t_

now i find one solution :
i create one CCArray * arrayAction, then add all action into arrayAction .

m_sprite-> runAction(CCSequence ::create(arrayAction));