How to implement loader in my cocos2d-iphone game?
===

I want to implement startup loader in my app. It should be like this: after startup splash screen, user will watche simple animataion and meanwhile app preload sound effects, bacground music, sprite images, spritesheets and so on. Current implementation:

    - (id)init {
    	if((self = [super init])) {
    
    		// Some other setup ...
    		CGRect rect;
    		rect = waveSprite.textureRect;
    		waveInitialTexRectOrigin = rect.origin;
    		rect.size.width = 91;
    		waveSprite.textureRect = rect;
    
    		assetFilenames = [[NSArray alloc] initWithObjects:
    
    						  // images
    						  @"background.png",

    						  
    						  // spritesheets
    						  @"sprites.plist",
    						  
    						  // fonts
    						  @"main.png",
    						  
    						  // sound effects
    						  @"button.wav",
    						  nil];
    		assetCounter = 0;
    		[self loadAsset];
    	}
    	return self;
    }
    
    
    - (void)update:(ccTime)dt {
    	CGRect rect;
    	rect = waveSprite.textureRect;
    	rect.origin.x += dt*kLoaderWaveSpeed;
    	while (rect.origin.x > waveInitialTexRectOrigin.x + kLoaderWavePeriod) {
    		rect.origin.x -= kLoaderWavePeriod;
    	}
    	waveSprite.textureRect = rect;
    }
    
    #pragma mark Private
    
    - (void)loadAsset {
    //	CCLOG(@"loadAsset");
    	
    	NSString *filename = [assetFilenames objectAtIndex:assetCounter];
    	CCLOG(@"loading %@", filename);
    	
    	NSString *ext = [filename pathExtension];
    
    	if ([ext doesMatchRegStringExp:@"[png|jpg]"]) {
    		[[CCTextureCache sharedTextureCache] addImage:filename];
    	} else if ([ext isEqualToString:@"plist"]) {
    		[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:filename];
    	} else if ([ext doesMatchRegStringExp:@"[caf|wav|mp3]"]) {
    		[[SimpleAudioEngine sharedEngine] preloadEffect:filename];
    	}
    	
    	assetCounter++;
    	
    	if (assetCounter < [assetFilenames count]) {
    		[self performSelector:@selector(loadAsset) withObject:self afterDelay:0.1f];
    	} else {
    		[self performSelector:@selector(loadingComplete) withObject:self afterDelay:0.2];
    
    	}

But the animation is SO abrupt.