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
Integration of Videos into a Greenfoot Project
By alexanderyoyo, with 6 replies.
Last reply by tylers, about 13 years ago:
i don't see anything wrong in that code.
try
can you look at you images to see if you have got any repeated images.
see in the world class that you nothing resetting the int called frames.
i will edit this when i think of more answers :p beware make sure you compress your images as it will not upload onto greenfoot
Difference between intersecting and atoffset(0,0)
By erdelf, with 1 reply.
Replied to by davmac, about 13 years ago:
Yes. "getOneIntersectingObject" finds an actor whose bounds intersect this actor's bounds; "getOneObjectAtOffset" finds an actor which intersects (covers) the point at offset 0, 0 from this actor's location.
Setting Coordinates of mouse
By erdelf, with 4 replies.
Last reply by erdelf, about 13 years ago:
well, ok forget it
Gravity
By abdullah.haris91100, with 1 reply.
Replied to by K_O_P, about 13 years ago:
For a scrolling world there are many scenarios, you can take a look at. I would recommend this: http://www.greenfoot.org/scenarios/3040 For gravity there are although many examples in this gallery.
How do you make leaderboards?
By kevinchaoo, with 3 replies.
Last reply by danpost, about 13 years ago:
If you have Greenfoot 2.2.0 or later, you can use the 'UserData' class. It has all the basics in what you are looking for.
How do I keep variables after you switch worlds?
By steved, with 3 replies.
Last reply by steved, about 13 years ago:
Thanks guys I will probably put it in the constructor of the new world. That would be easy as most things are based in my world anyways and there are only a few variables.
Is it possible to add objects to the world from a static class?
By mrjelle88, with 5 replies.
Last reply by mrjelle88, about 13 years ago:
Thank you very much, you saved me from a bad note in school! I had to get passed this to be able to move on to the next part, so it really helped me out :) Also I learned from your explaination! Thanks :)
Getting Screen X and Y Location of the Greenfoot simulation
By USBest, with 4 replies.
Last reply by USBest, about 13 years ago:
I want to set the location of the mouse at a startpoint. I already tried with: <Code Omitted>But this just setts the location on the computer screen... the method getStartPoint() returns an Object that is a subclass of Actor
UserData doesn't work online for me
By erdelf, with 7 replies.
Last reply by erdelf, about 13 years ago:
ok thx. I think our school supports in a few days the userdata
arithmetic doesn't works with negative numbers?
By erdelf, with 1 reply.
Replied to by erdelf, about 13 years ago:
forget it. used in the wrong method
quick question about the || and &&
By gusbus123, with 2 replies.
Last reply by gusbus123, about 13 years ago:
oh those were just examples. lol but thx. :)
Actor locating other Actor positions.
By gusbus123, with 10 replies.
Last reply by gusbus123, about 13 years ago:
YES!!! thx guys got it to work.
Really need help
By crazyjack12, with 6 replies.
Last reply by MatheMagician, about 13 years ago:
I noticed that, but I assumed crazyjack12 might have made an array so that he would have more choices or something. But yes that is much simpler.
Call to an URL
By niklaskar, with 1 reply.
Replied to by mjrb4, about 13 years ago:
See here for an example of accessing a URL and printing the output: http://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html Note though that this code won't work on the gallery. A better alternative might be to use Greenfoot's
built in support for such things
... :-)
How to clear an array of image
By SayMyName, with 1 reply.
Replied to by ttamasu, about 13 years ago:
I assume there is multiple nuke explosions simultaneously and it is not set statically, it will just use a lot of heap space. Since you are using the garbage collector, you can tell java to tell java to try to release memory but there is no guarantee that it will do so. If I were you I would declare it as a static variable then all your explosions will use one set of images instead of multiple sets. (See the book example for asteroids). The nice thing about doing this is that the initialization routine is only done once and the data is not duplicated. It would go something like pri
960
961
962
963
964
965
966
X