Scratch
Welcome to the A - Z guide to Scratch. This will cover all the advanced features of Scratch.
Changing Source Code
In here I will discribe how to access the source code and make new blocks.
1.) Shift-Click on the 'R' on the Scratch logo.
2.) Turn screen filling off.
3.) A grey outline will appear around Scratch.
4.) Click the grey and select 'open'
5.) Select 'browser'
Congratulations, you are inside the Scratch source code. You now can make new blocks and change anything on Scratch.
Make a new block
To make a new block, you need a class and a instance.
1.) Select 'Scratch-Objects'
2.) Select 'Class'
3.) Select 'ScriptableScratchMorph'
4.) Select 'block specs'
5.) Select 'block specs' again
This is the code that defines any block used in Scratch. Now we can make a take photo block.
1.) Scroll down to the end of the control tab
2.) Paste the code (Alt-V) use this code ---> ('take photo' #- #takePhoto) <---
3.) Now right-click and select 'accept'
4.) Close the browser
Now if you go on the contol block menu and scroll down, you should have a take photo block. If not DO NOT do the next steps, instead close down scratch and DO NOT save changes.
1.) Shift-Click the 'R' in the Scratch Logo
2.) Select 'Turn Screen Filling On'
3.) Shift-Click the 'R' in the Scratch Logo
4.) Select 'Save Image for End User'
5.) Select 'Yes'
6.) Reopen Scratch
Congratulations you have made a take picture block and done your first Scratch Mod (Modification)
Continue Reading This Section To Learn More About Blocks
When you make a block it looks like follows.
('take photo' #- #takePhoto)
↑ ↑ ↑
1 2 3
1.)
This is what the block is called. (In speech marks)
2.)
If the block should have a feature, like a variable list or a colour selector.
3.)
This is the method to be called when the block is activated.
If you are still with me carry on.
So what is a method?
A method is what is actiated when you click a block. It is how the block functions.
How can I find them?
1.) Select 'Scratch-Objects'
2.) Select 'Instance'
3.) Select 'ScriptableScratchMorph'
This allows you to choose which type of block instance to look at.
If you right click and select 'new catagory'
Then select 'new'
Type 'new ops'
This will allow you to make your own methods and store them in 1 place.
This is a example of a method.cloneMe
| clone |
clone _ self duplicateNoAttach.
clone isClone: true.
clone eventReceived: (ScratchEvent new name: 'Scratch-CreationEvent' argument: 0)So experiment and make your own blocks, post them http://scratch.mit.edu/forums/viewtopic.php?id=33653 <-- Here
Logo Modification
Would you like to change Scratch's logo in the top left heres how.
1.) Shift-Click the 'R' in the Scratch Logo
2.) Select 'Turn Screen Filling Off'
3.) Alt-Click the logo until a pen icon shows up near it.
4.) Click the pen icon and begin editing!
To save your new logo:
1.) Shift-Click the 'R' in the Scratch Logo
2.) Select 'Turn Screen Filling On'
3.) Shift-Click the 'R' in the Scratch Logo
4.) Select 'Save Image for End User'
5.) Select 'Yes'
6.) Reopen Scratch
Congratulations you have a new logo.
Mesh
Mesh is a feature that allows 2 Scratch programs ( connected by a network ) to share variables & broadcasts.
How to get it:
1.) Shift-Click on the 'R' on the Scratch logo.
2.) Turn screen filling off.
3.) A grey outline will appear around Scratch.
4.) Click the grey and select 'open'
5.) Select 'browser'
6.) Select 'Scratch-UI-Panes'
7.) Select 'ScratchFrameMorph'
8.) Select 'menu/button actions'
9.) Select 'addServerCommandsTo:'
10.) On the 3rd line change 'true' to 'false'
11.) Rigtht click and select 'accept'
12.) Close the browser
13.) Shift-Click the 'R' in the Scratch Logo
14.) Select 'Turn Screen Filling On'
15.) Shift-Click the 'R' in the Scratch Logo
16.) Select 'Save Image for End User'
17.) Select 'Yes'
18.) Reopen Scratch
Now if you shift-click the Share Menu option there will be 4 new options.
Host Mesh
Join Mesh
Leave Mesh
Show IP Adress
Changing a Blocks Colour
So you've made your best project and want to make things easier to understand, or you want to colour code scripts this is how.
1.) Shift-Click on the 'R' on the Scratch logo.
2.) Select 'Turn screen filling off'
3.) A grey outline will appear around Scratch.
4.) Drag the block to chnage the colour off in to the grey outline
5.) Alt-Click the block
6.) Click the spanner (debug me)
7.) Select 'control-menu'
8.) Select 'change colour'
9.) Re-colour the block
10.) Close down the colourp picker
Repeat steps 4-10 as may times as you want.
11.) Shift-Click on the 'R' on the Scratch logo.
12.) Select 'Turn screen filling on'
Congratulations you've changed a blocks colour!
Other blocks
So if you want new blocks in Scratch 1.4, but do not want to hack, well we turn to red blocks, otherwise known as old blocks or obsolete blocks.
http://scratch.mit.edu/projects/jeffy24/396723.
In here you can find all of the red blocks (- the comment block) to expand your Scratch projects. They will work in all NEW (1.4) versions of Scratch. (The comment block does stop the script however)
Other Versions
As you may or may not know Scratch has been changed and modified to make new 'hacked' versions. Here is a link to a thread containing the modified ones.
http://scratch.mit.edu/forums/viewtopic.php?id=34079
Making Save Data
What you would do is have your own compiler.
So what you do you store all the varibles and data in a single variable separated by a '/'join | 'Complied' | + | join | '/'| + |'other variable'| |
You repeat that code as many times as needed.
At the end put:join | 'Compiled' | + '/'
Then you make a script like
set i to 0
set n to 0
delete all of save list
repeat |length of 'Compiled' + 1 | {{
change i by 1
if | not | letter i of 'Compiled' = '/' ||
{
set variable n to |join n and |letter i of 'Compiled'||
}
if | letter i of 'Compiled' = '/' |
add 'n' to save list
set n to '(nothing)'
}}This would change a save data into a list.
save list = list
i = variable
n = variable
compile = variable
More to come soon!
Last edited by johnnydean1 (2011-06-13 17:19:23)
Offline
Html code doesn't work on the scratch forums, you have to use BBcode.
Offline
johnnydean1 wrote:
Which is..
http://scratch.mit.edu/forums/help.php Read.
Offline
johnnydean1 wrote:
Well do you like?
Of course this only applies to the non-source code version.
Offline
climber59 wrote:
How is this guide an A-Z guide? Also fix "Sourse" in the top header.
Its to grab attention I geuss.
Offline
How do you get the original scratch logo back?

Add zip the cybug, bob the sea urchin, and firegrob to your sig!Offline
This is brilliant!!!
It has all the information in one topic, great!
Offline
More to come soon
At least somebody likes it lol
Offline
i can't make the block, I never see it after I click accept.
Last edited by Twilight-Tak (2010-07-25 21:18:36)
Offline
I see one fail: you called them instances. They're actually called methods. (nXIII told me that so don't say it's wrong!)
Offline
Also, if you right click a instance/method, one of the options will be delete method.
Offline