Skip to main content
KasunL
Participant
February 19, 2016
Question

Moving Background

  • February 19, 2016
  • 1 reply
  • 388 views

Hi!


I have to make a game similar to "Color Switch" or Super Mario, that moves the background as the player moves forwards or backwards (or in the case of 'Color switch' up and down) -- (i.e. I want the effect such as when the camera follows a moving car, the frame's BG is moving in opposite direction to the car--something like that). For example in Super mario or 'Color switch', the background seems to move endlessly without a seeming end. How can i achieve this effect?? If you guys know any tutorials, have tips, or any input, i would appreciate it greatly. 

Thanks! 
Kasun.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
February 19, 2016

use a loop (eg, enterframe), that checks the current movement key and updates the background's x property accordingly.

for tutorials, google:  actionscript 3 background scroll

KasunL
KasunLAuthor
Participant
February 20, 2016

Thanks kglad, I'll try that. And thanks for the google keywords.

If anyone has other inputs, please post them too.

Thanks.

kglad
Community Expert
Community Expert
February 20, 2016

you're welcome.