0

I'm new to cocos2D , I have a image with 640 X 1136 pixel and I set it as background sprite statically. Now I want to move this sprite, continuously like moving background in upward direction. Set the code below in init method. Here my code :

background = [CCSprite spriteWithFile:@"bgImagevertical.png"];
    background.scaleX = 1;
    background.scaleY = 1;
    NSLog(@"size X :: %f  &&  Y :: %f",size.width,size.height);
    background.position = ccp(size.width/2,size.height/2);
    [self addChild:background];
Tobias Kienzler
  • 25,759
  • 22
  • 127
  • 221

1 Answers1

0

Lot of Parallax scrolling tutorials are available on internet. Try searching with the right term. Here is the one for you: http://www.learn-cocos2d.com/2012/12/ways-scrolling-cocos2d-explained/

codesnooker
  • 1,191
  • 10
  • 19