% if debug: % endif <%include file="/template/header.html" />

ScratchClient bridge to scratch2, scratchX

This documentation is applicable to connect the web version of scratch2 named scratchX from http://scratchx.org/#scratch with scratchClient.

Connecting scratch2 to hardware needs the following steps

Start scratchClient with the configuration xml file for your hardware.

Load http://scratchx.org/#scratch into the browser.

In 'more blocks', 'Load Experimental Extension',

press on Load Experimental Extensions and open Extension URL

Paste the following url into the form https://megjlow.github.io/extensionloader.js

This url brings the Load Extension Block into the additional block palette.

The Load Extension Block is now used to load the scratchClient configuration. Best practice is to prepare a small script in stage which loads the scratchClient config.

The program shall use 'blueFlag' in all places where the green flag hat is usually used.

The url to use to load the scratchClient extension is http://localhost:8080/scratchx/js/extension.js
If scratchClient is running on a different computer, change 'localhost' to either the other computer's IP-address which is something like 192.168.2.203 or perhaps a more meaningful name when the network configuration allows this.

Validation. See the 'green' dots to the right of the extension name. If these turn red, connection is list and scratchClient is not started.

Loading a project using scratchClient extension

A program loaded from file system shows the Load Extension Block, but not the scratchClient extension. The blocks from the scratchClient extension are displayed as red blocks.

When program is started with green flag and the proposed initial script is executed, the Load Extension Block reads the extension from scratchClient and the program can be used.

<%include file="/template/footer.html" /> % if debug: % endif