How to grow and shrink an object and do it repeatedly it forever.

I have loaded a sprite called alice.

CCSprite* alice = CCSprite::SpriteWithSpriteFrameName(“alice.png”);

// Make alice grow and shrink
alice~~>runAction,CCScaleTo::actionWithDuration,NULL)));
It throws an Error 1
error C2664: ‘cocos2d::CCRepeatForever::actionWithAction’ : cannot convert parameter 1 from ‘cocos2d::CCFiniteTimeAction ’ to ’cocos2d::CCActionInterval

It is actually an Objective-c code :
//Make Alice grow and shrink.
, , nil] ] ];
I have seen the tests file but it doesn’t help me .
CCActionInterval* actionBy = CCScaleBy::actionWithDuration;
CCActionInterval* actionByBack = actionBy~~>reverse();
m_grossini->runAction( CCSequence::actions(actionBy, actionByBack, NULL));

Here grossini is grown and shrink but I want to do it repeatedly.

Please help.

Hi,

I’m using a code similar to yours to pulsate a text like this:

lblTime->runAction(CCRepeatForever::actionWithAction(CCSequence::actionOneTwo(CCScaleTo::actionWithDuration(0.15f,0.75f),CCScaleTo::actionWithDuration(0.85f,0.65f))));

and it works without any problems.