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
Newtons Lab 2 Second Edition Cannot find symbol - class Color
By koloughlin, with 1 reply.
Replied to by danpost, almost 10 years ago:
The error is probably not in the Body class, but rather in your World subclass where you try to create a Body object. You can add an import line for the Color class or change 'new Color(12, 12, 12)' to 'new java.awt.Color(12, 12, 12)'.
Complition of a chess board using a horse!
By CatalinM, with 1 reply.
Replied to by danpost, almost 10 years ago:
I would start by having two world constructors. The first one with no parameters would call the second one with an int parameter to indicate the number of squares along one side of the board. This second constructor should possibly create and set the background image and add the horse into the world. The act method could check for numeric keystrokes between 5 and 9 (perhaps) to recreate the world with a different size.
Trying to animate my character
By GTRLambo26, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
Remove all the 'else ...' from the animateDown method. You only need to make sure that if no down1...11 image is used (so coming from a different direction), you set one.
java long nullpointerexception
By divinity, with 27 replies.
Last reply by divinity, almost 10 years ago:
thanks very much danpost, it work out well, many many thanks danpost and super_hippo
How to create an Otherclasses?
By LiuHan, with 3 replies.
Last reply by LiuHan, almost 10 years ago:
Found it, thank you guys!
How to stop music in actor when greenfoot stops and when world changes
By Henkbot, with 2 replies.
Last reply by danpost, almost 10 years ago:
You might make use of my BgMusic class which is located in my
BgMusic Actor Class Demo
scenario. The class is designed to control the background music regardless of the active world. The use of the 'stopped' method is still required when the scenario changes from the running to the paused state (and the 'started' method when going the other way); but, no reference is needed to the BgMusic object because of the way the class was designed. All your World subclasses will need implementations of both the 'started' and 'stopped' methods if all
Pls help me !!!
By chung1998, with 1 reply.
Replied to by danpost, almost 10 years ago:
Open up the editor for the class (double click on class or right click and select 'Open editor'); then, add code to 'act' method.
Repost: Greenfoot not working since about 4 days ago
By LakeOtis, with 6 replies.
Last reply by LakeOtis, almost 10 years ago:
danpost wrote...
LakeOtis wrote...
I don't understand. Should I remove <Code Omitted>?
No. You need to remove: <Code Omitted>The third line from the top of the class. It starts a multi-line comment which does not end until the '*/' on line 10, which makes the class declaration line, <Code Omitted>a documentation line instead of a line of code the compiler needs to look at.
Thanks, I hope it compiles Edit: IT WORKS! THANK YOU!
actor chasing actor program HELP
By Classydiamond74, with 2 replies.
Last reply by Classydiamond74, almost 10 years ago:
ok thanks for the help will try it out
Help with finding the fault
By Lars2501, with 2 replies.
Last reply by Lars2501, almost 10 years ago:
Thanks I did it
Int method's syntax incorrect? What am I missing?
By alittle_bit, with 3 replies.
Last reply by alittle_bit, almost 10 years ago:
Thank you for the replies Hippo & danpost! I will remember to return the value given by the method if I am creating an int, boolean, etc, in future then.. On another note, the method was removed and the randomised position was achieved through placing the 'getRandomNumber()' method inside the 'addObject()' method. As always, I appreciate the hard work you do supporting others danpost, thanks for the thought put into other ways I could achieve my goal too and thanks hippo for the straightforward and clear reply too!
Beginner. Why isn't this working. Add new object
By pla97, with 2 replies.
Last reply by pla97, almost 10 years ago:
Oh, ok. Thanks,
Character Customisation Button
By JollyMonSam, with 1 reply.
Replied to by danpost, almost 10 years ago:
JollyMonSam wrote...
How would I code a button so when it's pressed it changes the skin tone of the character up or down according to the current skin tone?
What have you tried? What do you think will be involved?
Need help saving world instances when moving to new worlds
By CSnoob, with 3 replies.
Last reply by Super_Hippo, almost 10 years ago:
Alright. Btw, line 15 doesn't do anything since you are doing the same thing in the next line again. And if you change the 'coastalFrame' in line 16 to 'this', you can also remove line 10 ;)
Have a Problem with my Script :/
By H0ly1812, with 2 replies.
Last reply by H0ly1812, almost 10 years ago:
Ok it works thanks
423
424
425
426
427
428
429
X