I still get the page scrolling in Chrome/Firefox/IE and I'm running Windows 7. I'm having trouble finding this on google too, I'll keep searching and see if I can find out anything I should change. Scrolling seems to not lose focus of the Applet, but having focus does not prevent scrolling via the Mouse Wheel (although it does prevent scrolling via the arrow keys)
The mouse image is disabled simply by setting the mouse image to a transparent image, using the code davmac provided in the discussion. You can check out the source for any clarifications :)
I had some early issues generating the Image object to initialize the cursor, as it kept giving me a security exception, so I eventually resorted to taking an AWTImage object out of a GreenfootImage object and using that :P
Safari on Mac OS X 10.6 also is fine.
I haven't looked at the source, but do you consume the mouse events? (I think there is a "consume()" method in the MouseEvent class, or something like that). You may need to consume them to prevent them from getting to the browser window. Worth a try anyway.
A new version of this scenario was uploaded on Tue Apr 19 04:10:04 UTC 2011
Trying to use consume() to prevent scrolling in certain OS's
Thats weird, hmmmm I don't know why that would be happening, as whenever you click, it explicitly *sets* the mouse image to transparent. What OS and browser are you using?
As much as I hate being "that guy" your description says "Enjoy the code and use it in all your Greenfoor Scenarios :D " ...lol, I dont think you intended that, on a different note: Great job here with the scenario!
I just saw this and got excited to implement scrolling through something such as a page vertically. But I don't see a way to also scroll horizontally. Don't know what that would consist of. On a track pad on my mac I can scroll vertically and horizontally with similar motions. And I believe on a typical mouse, when you press in the scroll wheel you can do the same thing.
Is there any way to set it back to default? If I want to use it in one world (at least similar as how you have it), but change from that world to another, how to I get the original cursor back (without clicking on reset and set the world manually)?
2011/4/18
2011/4/19
2011/4/19
2011/4/19
2011/4/19
2011/4/19
2011/4/19
2011/4/20
2011/4/25
2011/4/28
2011/4/29
2011/4/30
2011/4/30
2011/5/1
2011/5/26
2011/5/26
2011/11/12
2011/11/12
2013/4/25
2013/4/25
2017/6/22
2017/6/22
2017/6/22
2017/6/22
2017/6/23