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

#1 2009-03-10 09:51:12

mcguire
Scratcher
Registered: 2008-07-08
Posts: 3

change color effect not working as expected on website

Hi,

I made a project where I have dice that I want to switch between two different colors, so I used <change[ color ]effect by( 100)  It works fine offline, but online it is picking lots of different colors.

Any suggestions?

Offline

 

#2 2009-03-10 10:12:39

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: change color effect not working as expected on website

Unfortunately, there are some differences with the way the Java player (online) works with colors.  The simplest solution might be to make different costumes with the colors you want and then just switch costumes. 

Another approach, that I have seen used but can't put my finger on, is to have different script branches for online and offline colors (there is a simple relationship) and then have the project test to see if it is running online or offline and use the correct one depending on its environment.  There is no built-in test for online/offline environment so if you use this approach, you must use color-sensing behavior to figure out the environment.  Tricky stuff!

Okay, found a few things...here is the project by 1tchy that shows how to sense the environment

http://scratch.mit.edu/projects/1tchy/92324

There was a forum thread that discussed it more, by the same person I think.

http://scratch.mit.edu/forums/viewtopic … 117#p21117


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2009-03-19 15:25:11

mcguire
Scratcher
Registered: 2008-07-08
Posts: 3

Re: change color effect not working as expected on website

Thanks!

Offline

 

Board footer