http://scratch.mit.edu/forums/viewtopic.php?id=2440 Look At Other Topics Before You Post Another.
Offline
look @ my scrolling tutorial, not only does it explain how its done, but the teory behind how it works, and a not a well known techniqe for getting a infinite scrolling effect!
Offline
u can look at the scrolling project tutorial that i made. type in bosoxtutorial in the search bar then click on bosoxtutorials stuff then scroll down and click on the one that says: how to scroll
Last edited by bosox397 (2009-02-09 19:46:47)
Offline
The question's been answered, but here's a quick guide.
You need to make a bunch of terrain sprites for the scrolling background. (you can name them terrain1, terrain2, etc. so it's easy to tell them apart.) So basically, because sprites can only be 480x360 unless you use a glitch, you need to chop up the scrolling screen into sprites and just continue from one sprite to the other.
Then, make a variable called scroll x (or scroll y if it goes up/down).
After that, put this script into each terrain sprite:
<when green flag clicked>
<forever>
<set x to( (( <{ scroll x }> <*> [# of the terrain sprite here] ))
<end>
[/blocks]
Then, in your character sprite, put in this script:
<when green flag clicked>
<forever>
<if><key[ right arrow ]pressed?>
<change{ scroll x }by( [how fast you want the background to go]
<end>
<if><key[ left arrow ]pressed?>
<change{ scroll x }by( [how fast you want the background to go, but negative]
<end>
<end>[/blocks]
Last edited by hmnwilson (2009-02-09 20:37:41)
Offline
http://scratch.mit.edu/projects/47fg74/412000/
Check this out and download. it might help
Offline