You need to enclose your code in an -(id)init method, like this:
@implementation Background
- (id)init
{
if (self = [super init]) {
// Load the sprites for each parallax layer, from background to foreground.
CCSprite* para1 = [CCSprite spriteWithFile:@"color.png"];
// ... the rest of your code ... //
}
return self;
}
@end