Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Moving Background

New Here ,
Feb 19, 2016 Feb 19, 2016

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.

TOPICS
ActionScript
361
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2016 Feb 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2016 Feb 19, 2016

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

If anyone has other inputs, please post them too.

Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 20, 2016 Feb 20, 2016
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines