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

Report as inappropriate.

danpost
danpost presents ...

2012/6/8

World Changing Demo

Watch as babies crawl around and drag their crayons, marking up everything. This demo illustrates how to use different worlds to accomplish various tasks (menu world included).

7545 views / 14 in the last 7 days

4 votes | 0 in the last 7 days

Tags: mouse demo with-source menu danpost setworld worlds

This scenario is a member of: Demos by danpost


open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sat Jun 09 10:44:50 UTC 2012 Gave MenuWorld some flexibility, in that the calling world now determines the options to display. This allows it to be re-used in the scenario (with different options).
A new version of this scenario was uploaded on Sat Jun 09 10:56:27 UTC 2012 Gave MenuWorld some flexibility, in that the calling world now determines the options to display. This allows it to be re-used in the scenario (with different options).
A new version of this scenario was uploaded on Tue Oct 02 13:42:20 UTC 2012 Demo on the use of 'setWorld(World world)'. Uses four different worlds; one is 'MenuWorld'.
danpostdanpost

2012/10/2

Latest update only changed the mechanism to return the value of the selected menu option. I felt that others who might use this code should not have to be responsible in clearing the selected menu option value after getting it (it now clears automatically when you do get it)
A new version of this scenario was uploaded on Thu Oct 25 00:34:44 UTC 2012 Added more documentation to this 'setWorld' demo
ronzhironzhi

2013/4/30

how to reset this world? i try Greenfoot.setWorld(new InfoWorld(1, inWorld)); it says differ in length
danpostdanpost

2013/4/30

@ronzhi, please start a discussion and explain in detail what you attempting and how it is not working the way you want, giving the exact error message, and what code you are using (including the InfoWorld class constructors, since you are creating a new instance of that class).
A new version of this scenario was uploaded on 2017-12-22 20:32:15 UTC
danpostdanpost

2017/12/22

Now, updated for HTML5.
nolttr21nolttr21

2018/12/6

This is really cool, I had no idea that you do things like this in Greenfoot

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

Who likes this?

twinArmageddons nolttr21 TomazVDSN Klein3