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

Report as inappropriate.

danpost
danpost presents ...

2012/11/20

Scrolling SuperWorld

An easy-to-use world superclass that implements scrolling actors and background. Fully documented with instruction and code.
When using cell sizes greater than one, all dimensions (world and universal) are rounded up to next odd integer.

jump: up arrow
move: left and right arrows

20806 views / 58 in the last 7 days

36 votes | 0 in the last 7 days

Tags: demo with-source scroll danpost superclass supportclass superworld

This scenario is a member of: Scrolling games, Support Classes by danpost


open in greenfoot
Your browser does not support the canvas tag.
Roshan123Roshan123

2020/11/29

And abt arrow.gif Its not a gif Will it work???
danpostdanpost

2020/11/29

@Roshan123, I am quite sure it is not permanent. Your account will probably be back in order by Monday. That is, I would wait until the weekend is over before really getting concerned.
danpostdanpost

2020/11/29

@Roshan123, if not gif, then what?
Roshan123Roshan123

2020/11/29

int hex = 8595;// for arrow char ch = (char) hex; System.out.println(ch); Procedure which i followed :- Copy the arrow frm terminal and paste it in greenfoot I don't know but i think its not a gif
danpostdanpost

2020/11/29

@Roshan123, okay -- it is a character glyph. I basically copy/pasted the code given and I get a arrow, pointing downward, in the terminal.
Roshan123Roshan123

2020/11/29

So will it work by writing GreenfootImage arrow = new GreenfootImage("⬆");
danpostdanpost

2020/11/29

@Roshann123, not with that. Just use: ((char)8595) like: System.out.println(""+((char)8595)+"");
Roshan123Roshan123

2020/11/29

I think it will show it in terminal which i don't want System.out.println(""+((char)8595)+""); I want arrow to be shown in the world getBackground().drawImage(new GreenfootImage(""+((char)8595)+"",20,null,null)500,500); Will it work ⬆⬆⬆
Roshan123Roshan123

2020/11/29

I copied the arrow frm blue j terminal and wanted to paste it in greenfoot to show it in world
danpostdanpost

2020/11/29

@Roshan, it will work: getBackground().drawImage(new GreenfootImage(""+((char)8595), 20, Color.BLACK, new Color(0, 0, 0, 0)), 500, 500);

See all comments

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

Who likes this?

Goku555 Sonal julius68 matthijs124 Kevroa Super_Hippo AreebRaza MusicalScore Jellyfish etbillder getreides Ruvero Dillybar Heavenly_Father_Banting Mimagic awesomeinmyworld Homicdle_moth asterodia al_griff sametguzelgun