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
"Animation" Help
By ChrisIsOsmer, with 1 reply.
Replied to by ChrisIsOsmer, about 13 years ago:
Well, I have finally figured out a way. Problem is I'm not sure how to delete this post so for now it will remain haha.
About the Class MouseInfo
By Upupzealot, with 3 replies.
Last reply by Upupzealot, about 13 years ago:
mik wrote...
Greenfoot.getMouseInfo() can return null. When it does, your 'mouse' variable will contain null, and then mouse.getX() fails with a NullPointerException, because you have no 'mouse' object. In general, you should call getMouseInfo after a mouse event, such as mouseClicked.
Thank you! Now I undersdand! Another question about mouse event, how can I find out if the mouse is hold on sth. I tried to figgure it out by getX() and getY(),is there some good iead?Thanks
New in Greenfoot, can Greenfoot_Promgrams read datas from a file?
By Upupzealot, with 6 replies.
Last reply by Upupzealot, about 13 years ago:
danpost wrote...
I think that the discussion
On creating and saving files
(http://www.greenfoot.org/topics/195) will answer your question.
I tried and it works, thanks
Mouse info?
By darkmist255, with 4 replies.
Last reply by darkmist255, about 13 years ago:
Thanks for all the help! I put a new public void called CheckMouse in ball.class and called it in Act(), and it worked perfectly . I also am making a limit to the ball count so that it doesn't lag. For some odd reason though, this isn't having the effect I thought it would. if(ballCount < 6) { getWorld().addObject(new Ball(), mouseX, mouseY); ballCount = (ballCount + 1); }
Crab Game Programming Question
By 2woodsway, with 1 reply.
Replied to by mik, about 13 years ago:
It's hard to tell without seeing what you did. Can you show us the code snippet that you think should make your variable change?
Code for a downwards scrolling background
By DjDiamondImport, with 1 reply.
Replied to by mik, about 13 years ago:
There is a demo for a side scrolling background here:
http://www.greenfootgallery.org/scenarios/243
You could look at this and adapt it to scroll vertically.
Getting <identifier> expected error
By toro, with 2 replies.
Last reply by delmar, about 13 years ago:
Good that you found it. One thing to keep in mind is that the error message is not always very precise or helpful - looking around the area of the error often shows what's wrong.
Alternatives to Greenfoot.delay()?
By craigC, with 5 replies.
Last reply by darkmist255, about 13 years ago:
Thanks :D!
Code for a counter!!!
By ChrisEthridge, with 1 reply.
Replied to by ez4u2c, about 13 years ago:
Take a look at this tutorial which does exactly what you are describing.
http://www.greenfoot.org/doc/howto-1
How do I prevent the scrolling on the view of the scenario?
By kram6373, with no replies.
I can't go full screen with my scenario window. It starts like this. I've tried uninstalling and reinstalling. Still doesn't change. Please help!!
Image
By Canning, with 37 replies.
Last reply by kiarocks, about 13 years ago:
done!
Intersections
By hesh, with 3 replies.
Last reply by jyatiz, about 13 years ago:
I want to use the following code to detect when an object is in the cell, however it´s and it seems to loop back and forward as it turns around once it gets past the grass object if (puedoMover(getX(), getY()) == true && zacate != null){ girarMediaVuelta(); } public void girarMediaVuelta() { // Quiz #1 switch(getRotation()) { case ESTE: setRotation(OESTE); break; case SURESTE: setRotation(NOROESTE); break; case SUR: setRotation(NORT
scenario to .exe?
By kiarocks, with no replies.
Is it possible to make an exe from a scenario?
Security Issues?
By DonaldDuck, with 2 replies.
Last reply by DonaldDuck, about 13 years ago:
Ah, I see. Sorry for the incorrect accusation.
Making a variable raise at a slower rate
By w1llis, with 10 replies.
Last reply by Upupzealot, about 13 years ago:
Date dt= new Date(); Long time= dt.getTime();//this is the ms(1000ms = 1s) number beginfrom 1970_1_1_00:00:00_0ms I didn't try it, but if ti's OK.I think it would help.
1031
1032
1033
1034
1035
1036
1037
X