How to pause the scrolling background

big12isu

  • Posts: 19
I am making an ios game and when I pause the game my scrolling background doesn't pause. It keeps scrolling and I want it to stop. How can I pause the scrolling background so that it pauses when I pause my game?

Yeti Ball

  • Posts: 101
This is an old post, but I would also like to know if this is possible.  Bump! ;D

Water Drop Game
Check out my new game on the Stencyl Arcade (UPDATED June 21st!).
http://www.stencyl.com/game/play/13158
Don't forget to comment and rate! :D

Xietao

  • Posts: 725
If you know about code maybe using:
ScrollingBackground
For Flash.
Free Time:
Monday, Wednesday, Friday: 13h
Tuesday, Thursday, Saturday, Sunday: 7h
Loving Linux...

LePoulpe

  • Posts: 181
Bump too !

I would also like to know if this is possible on iOs please ?


Xietao

  • Posts: 725
I found this:
Code: [Select]
@interface ScrollingBackground : ImageBackground
{
@private
double mXVelocity;
double mYVelocity;
}

-(ScrollingBackground*)init:(int)ID name:(NSString *)name image:(SPTexture*)image repeats:(BOOL)repeats xVelocity:(double)xVelocity yVelocity:(double)yVelocity;

-(void)loadGraphics:(SPTexture*)image;
-(void)unloadGraphics;

@property (nonatomic, assign) double xVelocity;
@property (nonatomic, assign) double yVelocity;

@end
Free Time:
Monday, Wednesday, Friday: 13h
Tuesday, Thursday, Saturday, Sunday: 7h
Loving Linux...

LePoulpe

  • Posts: 181
Thanks Xietao

But how do you customize this custom code ?

frankstein

  • *
  • Posts: 11
Im having the same problem.

MikeyPB

  • Posts: 107
Hi! Again, sorry for the revival of an old post... but has anyone solved this yet?

twobrosapps

  • Posts: 40
3.2 has blocks for that.

MikeyPB

  • Posts: 107
*Checks* Damn, I'm still on 3.0! Thank you :)

CanadianHobo

  • Posts: 24
Does the background needs to be initially moving? 

EDIT:  Tested it and it requires to be "initially" moving but the background can start with no movement by using the code in "created" event. 

« Last Edit: July 23, 2015, 03:37:56 pm by CanadianHobo »