Skip to main content
Known Participant
February 15, 2009
Question

flash game scrolling background

  • February 15, 2009
  • 5 replies
  • 918 views
I am creating a flash game where the character stays in the centre of the screen and the background image scrolls past as keys are pressed. The scrolling works fine, and the background image won't scroll of the screen to the left or the right. It is with the up and down where I am having a problem. The image will scroll upwards off the screen and won't scroll downwards as it should...
here's my code:
This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
February 17, 2009
you're welcome.
Known Participant
February 16, 2009
yay!!!
you solved it for me.
thank you!
kglad
Community Expert
Community Expert
February 16, 2009
it would indirectly solve your problem because knowing that is key to knowing the code required to prevent your background from scrolling off-stage.

if you double click your background you should be taken that the background's timeline. in the viewing area the stage center (marked by a plus) is where? the upper left of your bg graphic? the center of your bg graphic? elsewhere?
Known Participant
February 16, 2009
I don't know what that is...
Would that solve my problem?
kglad
Community Expert
Community Expert
February 15, 2009
where's the reg point of your background?