This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Creating and changing volume bar?
By mjrx7, with 3 replies.
Last reply by danpost, almost 9 years ago:
mjrx7 wrote...
Yea, I was reading through a bunch of back and forth posts with other people regarding the mouseClicked and finally realized my mistake of needing an object and not a class. It'd be nice if Greenfoot told you that listing a class is not right as it doesn't flag it as an error, it just makes it not do anything. Enough people have seemed to have made the same mistake.
The following:
Greenfoot class API documentation wrote...
public static boolean mouseClicked(java.lang.Object obj) True if the mouse has been clicked (pressed and released) on the given object. If the parame
Breakout - cant place paddle and blocks
By Phirippu, with 5 replies.
Last reply by danpost, almost 9 years ago:
Phirippu wrote...
And how i have to write it then ?
You can start by re-writing your 'fuellen' method. Put the for loops in it to add the blocks into the world.
This page
of the java tutorials shows how to use for loops.
Breakout - Bouncing Ball sticking on the floor and the right side
By Phirippu, with 2 replies.
Last reply by Phirippu, almost 9 years ago:
Its is working now!!! Thank you
I need a little (maybe a lot) of help
By Wasupmacuz, with 2 replies.
Last reply by Wasupmacuz, almost 9 years ago:
danpost wrote...
Wasupmacuz wrote...
I've been trying to make a rectangle appear as an actor's image
One thing that would make things a lot easier is using the GreenfootImage class instead of using the 'BufferedImage' and 'Graphics2D' classes. As such, the code above can be re-written as follows:
Can you please help identify my code blocks and annotate my coding?
By Hamza_Abdulla03, with 10 replies.
Last reply by rishitandon, almost 9 years ago:
hi Hamza
im having problems with this code here!
By S77, with 9 replies.
Last reply by S77, almost 9 years ago:
omfg thank you ive spent ages trying to get this to work
Simulating Keyboard Inputs, Using Code?
By MySimpleBox, with 1 reply.
Replied to by danpost, almost 9 years ago:
MySimpleBox wrote...
Is there a way to lets say make greenfoot act as if "g" was pressed using the Greenfoot.isKeyDown command. Basically can I simulate a keystroke without actually pressing the key?
There is the java.awt.Robot class that contains methods like 'keyPress(String key)', 'keyRelease(String key)', 'mouseMove(int x, int y)' 'mousePress(int buttons)' and 'mouseRelease(int buttons)'. Maybe you could use it.
Help with animating an actor
By jcboz, with 12 replies.
Last reply by jcboz, almost 9 years ago:
Thank you guys both very much! Adding the else statement at the begginging of line 29 fixed the issue. I appreciate the help.
Is it ok for me to embed videos from the greenfoot channel?
By csarkar001, with 1 reply.
Replied to by danpost, almost 9 years ago:
Since this has not been responded to, I would suggest sending an email to: support@greenfoot.org
How to get a character to move with another moving platform
By sinlessclown, with 20 replies.
Last reply by danpost, almost 9 years ago:
Yehuda wrote...
@danpost Why do you need the '- 1' on line 14? (You seem to have a lot of trailing spaces on your lines of code.)
I copied and modified the previous code given (as far as trailing spaces are concerned). The '-1' is not absolutely necessary, but will prevent the last column of pixels in the image of the player from being off the right edge of the world.
Starter
By GarudaStreak, with 1 reply.
Replied to by Yehuda, almost 9 years ago:
I don't understand what you mean? What's the
first time
you open it? I would guess that the first time you open it, is when you click on the project.greenfoot file in your program directory, but then what's the second time?
Else is directly called even though if argument is true
By alfonsc, with 9 replies.
Last reply by alfonsc, almost 9 years ago:
Yeah I know. I just realised that. Thanks for your help!
Adding actor at random method problem
By vermox, with 2 replies.
Last reply by vermox, almost 9 years ago:
Thanks very much! Works perfectly now.
Reseting the world using an actor
By AustinProkopishin, with 28 replies.
Last reply by AustinProkopishin, almost 9 years ago:
I uploaded my finished project here: http://www.greenfoot.org/scenarios/19215 if you are interested in checking it out. Thanks a lot for all the help!
How do upload a scenario to greenfoot.org?
By AustinProkopishin, with 1 reply.
Replied to by AustinProkopishin, almost 9 years ago:
nevermind I figured it out
362
363
364
365
366
367
368
X