This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

danpost
danpost presents ...

2016/11/14

Scrolling Tutorial

A tutorial on scrolling worlds.

The Scroller class code can be found in the following discussion thread location:

http://www.greenfoot.org/topics/57567/0#post_111359

A demo of the Scroller class used can be found at this location:

https://www.greenfoot.org/scenarios/19020

11781 views / 42 in the last 7 days

15 votes | 0 in the last 7 days

Tags: None

Your browser is ignoring the <APPLET> tag.
VenbhaVenbha

2017/12/8

Amazingly Superb
VenbhaVenbha

2017/12/8

You were telling how to do it as well as doing it right then!
Paul12345Paul12345

2018/1/28

I can't seem to figure out how to set the background of the whole world to an image and not just the first viewpoint and then stretch it (on the limited scrolling). Like how it was done in your old Scrolling SuperWorld.
danpostdanpost

2018/1/28

@Paul12345 Please start a discussion thread on the issue.
AnJoMortoAnJoMorto

2020/10/29

Is there a way to make some actors move quicker than the player to make a perspective effect? Like change the scrolling speed of some trees to make them move slower to make them feel closer?
KizetsuKizetsu

2023/5/14

Why does Scroller is making some error, idk how to fix this, anyone help
danpostdanpost

2023/5/14

@Kizetsu, start a discussion thread on your issue. Provide your attempted codes (complete classes) and an error trace from that particular code. Help can then be provided.
JooshKJooshK

2023/12/6

When you talk about the object class, do I create a new class, or put it in the world/actor class?
JooshKJooshK

2023/12/6

I figured out the object class thing, but how do I get it to scroll horizontally instead of vertically?
danpostdanpost

2023/12/7

@JooshK, just use a zero value for the vertical offset when calling the 'scroll(int, int)' method. For example: scroll(1, 0);

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Zezimpkg Fire Choppins AbdulrazaqAS Gbasire Genota Game/maniac papst data17 nolttr21 aristotelis Maus2525 Paul12345 Venbha tkiesel