# How can I apply a “genie animation” to a CCSprite?

I am new to Cocos2D and following this tutorial.

I want to animate a CCSprite with the genie effect that OS X uses for hiding windows to the dock and showing them again.

Here's an example from an iOS library:

How can I do this in Cocos2D?

• Please do not cross-post questions in the future. I've flagged your SO question for deletion, since this site is probably the more topical one. – Josh Jul 17 '13 at 13:42

Use ccsprite with ccbadgenode in order fire number of frame of spite with moveto postion can change each frame interval with time .cccallfuntion is

-(void)playStarAnimation
{
Animation *anim = [Animation node];
sp = [anim playAnimCCSpriteWithFileName:@"STARS~ipad" frameName:@"STARS" Layer:physicsLayer From:1 To:42 Delay:1.0/20.0 Loop:4 Position:CGPointMake(512, 750) TAG:STARS_ANIM];
}

CCSequence *seq5 = [CCSequence actions:[CCDelayTime actionWithDuration:5.3],
[CCCallFunc actionWithTarget:self selector:@selector(playStarAnimation)], nil];
[self runAction:seq5];

• Use ccsprite with ccbadgenode in order fire number of frame of spite with moveto postion can change each frame interval with time .cccallfuntion is Please take the time to reword this into something a bit more readable. – ClassicThunder Aug 23 '14 at 19:56