Hi all,
Trying to do a seamless horizontal scroll with two sprites using the 'leap frog' technique. Both sprites are 480 x 360 so they take up the whole stage.
Each sprites x-value decreases constantly, until it reaches -480, then leaps back to a position of 480 on the x-axis. Only the sprite won't make it -480, it only moves to the left as far as -462.
Just wondering if anyone knows why this is?
Thanks for reading,
Mark.
Offline
No clue Mark, it would be much easier to understand the problem if you posted the project. That way I can download it and look at it.
Offline
Thanks for the tip. Project is now online:
http://scratch.mit.edu/projects/mark2810/414506
The code is on the 'stars1' and 'stars2' sprites. Where the values are set to '-462' and '462', try set them to '-480' and '480' and it should stop scrolling.
Offline
Oh I know what is wrong. When played in the scratch program sprites can only go so far off screen. In the online player, sprites can go farther offscreen.
You can't really do anything about how far it goes offscreen.
Offline
Yeah, it took me ages to figure that out -- kept thinking I was somehow missing something in the code, and ended up abandoning my scrolling projects.
Anyone know why this happens in the editor, and if it's on the list of to-be-fixed?
Offline
there is the sample project called snn and the little news thing at the bottom uses something like that
Offline