This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-05-22 10:04:59

jsimone
Scratcher
Registered: 2007-05-20
Posts: 28

Pen won't draw in the web Java applet

I have a project

http://scratch.mit.edu/projects/jsimone/5542

which works fine in the desktop application but does not behave the same way in the Java applet.  The web version does not execute this code for some strange reason.

The code in question is ...

when green flag clicked
   do forever
       pen down
       set pen size 27
       set pen Pen Color

Thanks,
Joe

P.S.  Is there a way to sense when a slider value has changed?  If not we need a way to determine that such an event occurred.

Offline

 

#2 2007-05-22 13:10:51

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Pen won't draw in the web Java applet

You can detect a slider change by having an extra variable

set old_slider to slider


forever if not slider = old_slider
     set old_slider to slider
     broadcast slider changed
     wait 0.02

(All forever loops should have a wait in them.)

Offline

 

Board footer