I just posted a new project at :
http://scratch.mit.edu/projects/jsimone/11518
However, it works improperly in the java applet. On desktop Scratch, Dan stays on the ground. But in the java applet Dan starts to fly off the ground even though we don't affect the y-position at all. Every time, he bounces off the edge he moves up in y-position.
Strange!
Offline
The problem may be that the initial direction is not exactly 90 degrees in the java implementation. The if-tests fail and things get gradually worse.
I tried replacing "if direction=-90" with "if direction<0" and "if direction=90" with "if direction>0" and everything worked ok in both squeak and java.
Offline
Thanks Kevin, that fixed the problem. There must be a rounding error in the java applet as you mentioned.
In the java applet the direction would slowly "creep" upward and downward at 90 +/- degrees.
Offline