I registered a new project 'Scratch Connect' on the SqueakSource. http://www.squeaksource.com/ScratchConnect.htmlScratchConnect is a package to connect Etoys and Scratch via Scratch Remote Sensor Protocol (http://wiki.scratch.mit.edu/wiki/Remote_Sensors_Protocol ).
Scratch Connect Morph
- Make the Scratch Remote Sensor ON.
- Open the parts-bin and draw a 'Scratch Client' out on the world.
- Double click the client morph to connect. It will open its eyes when it connected to a Scratch.
Here is a demonstration.
How to Program with ScratchConnect Etoys
Receive Message from Scratch
Received variable names via sensor-update message are added as variables of ScratchClient then put the values on that.
When the value of a variable was changed, an Etoys-event named the name of variable is fired.
Broadcast messages are sent as Etoys-event named the name of the message.
Send Message to Scratch
Send the value of "sensor-update" (like 'umdate light') by the tile scripts of a ScratchClientMorph.
Send "sensor-update" message by executing the 'sensor update("name" value)' tile in ScratchClientMorph.
Scratch makes a new "name" varialble in its sensor list.
Send "broadcast" message by executing 'broadcast(abc)' tile in the ScratchClientMorph.
Scratch will broadcast 'abc' in that.