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

Report as inappropriate.

jbrucker
jbrucker presents ...

2014/7/24

ScrollingWorld

This is an example of how to make actors appear to move beyond the boundaries of a world,
by making the background scroll. In this example a helicopter flies around a panoramic
image of the Bronx Zoo.

You can substitute any background image you like by editing ScrollWorld.java and setting
the constant PANORAMA_FILENAME to the name of your background image (by default
it should be in the images directory).
There are named constants to define whether your image is a 360-degree panorama in the
horizontal or vertical directions. If a constant is true, the image will be repeated in that
direction so the helicopter can keep flying forever in the same direction.

Email me or post a comment if you have questions about the source.

3460 views / 12 in the last 7 days

4 votes | 0 in the last 7 days

Tags: with-source

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Fri Jul 25 09:03:40 UTC 2014

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

Who likes this?

technoninjas Miss_Kitsch softwhizjx lordhershey