Zho:首页/教程/入门教程

🏴󠁧󠁢󠁥󠁮󠁧󠁿Though Scratch is designed for people totally new to programming, it can still be a challenging program to wield. Consisting of a script, paint, and sound editor, it has complexity to its structure. This tutorial is aimed at individuals completely new to all programming and looking to understand the concepts of Scratch.

Projects
Projects are animations, stories, Art (could be made in Pen Code), games — just about everything made in Scratch! The Scratch program is used to make Scratch projects, which can be shared to the world by the Scratch community. In other terms, a project is the created application that is run.

Offline Editor vs. Online Editor
Scratch offers two editors, an offline one, and an online one. Both are very similar but have minor differences. The online editor can be accessed by clicking Create tab or by clicking here. The offline editor can be downloaded here. The current version of Scratch is Scratch 2.0.

The Interface
The Scratch interface is divided into two sections: the project running environment and the project development. In the top-left of Scratch is the Stage, shown at the top of the image on the right. The Stage is where a Scratch project is physically run, so when one plays a game, the Stage is the window in which it is run. By default, the Scratch Cat is on the stage. The Scratch Cat is simply one of many sprites, or characters, buttons, etc. in a project. Characters are programmed to perform anything one wants! The flexibility of Scratch allows the creator to be imaginative and actually make the desired project. That is when programming comes into place, as it "makes things do what they should".

编程
在深入了解界面之前，了解Scratch如何编写代码块的最快方法是测试事物. 当使用一个新项目打开Scratch程序时，请按照以下步骤操作. 1. 访问Scratch程序的以下区域：



2. 选择蓝色的 "代码块"叫move steps, 并将其拖到右侧.



3.释放鼠标以放置块； 确保将块放置在较深的灰色（技术上称为scripts area）.



4.完成后，单击块上除白色中间以外的地方，然后观察Scratch Cat发生了什么……它移动了10步！



5.查看其他类别，并测试每个代码块的功能！



Blocks
As shown above, blocks are the literal building "blocks" of a Scratch project. They have specific commands which function uniquely from one another. Some blocks can even fit inside other blocks, as shown below: 1. Assemble the following "script", or connection of blocks, by accessing the various blocks by color and category.



2. Assemble the blocks into this formation:



3. Grab the blue key sensing block that is still in the void.



4. Place the block into the hexagonal input area in the orange "if" block.



5. Click the Green Flag to run the project, and see what it does!



6. Unless you were holding down the space key, nothing should have happened. Why is that? Take a look at the script again; remember, a script is a connection or stack of blocks. when gf clicked if  then move (10) steps end The script begins with "when green flag clicked", which was done. When the green flag is clicked, it triggers the script beginning with the "when green flag clicked" block to run. When the script ran, it first detects if the space key is down, and if it is, then the sprite will move 10 steps. Run the project again while holding the space key down, and the sprite will move 10 steps!

Paint/Sound Editors
Scratch even includes its very own paint editor and sound editor. A paint editor is a program used for designing and editing images. The Scratch paint editor can be used to draw the images for sprites (the characters, buttons, etc.). The sound editor is used for importing, recording, and modifying sounds used in a project. To access these two editors, click on the tabs above the blocks palette:



Sprites Pane
Not all sprites do the same functions in a project, so different sprites have different appearances, scripts, and sounds stored in their data. Accessing different sprites can be done in the sprites pane, located below the stage. The currently selected sprite has a blue box around it always; by simply clicking on a different sprite, its data can be accessed. The sprites pane is shown in the image to the right.

Creating New Sprites
Most projects on Scratch have indeed more than one sprite. How can new sprites be created in Scratch? Underneath the Stage is four valuable buttons for creating a new sprite:



With these buttons, a new sprite can be imported as either a plain image or one that already has scripts. The buttons, going from left to right, do the following:


 * Opens a pre-built sprite library with many choices
 * Allows one to draw his or her own sprite in the paint editor
 * Opens a file explorer to allow one to upload an image from his or her computer
 * Turns on the computer webcam to take an image for a sprite

Project Sharing
For a more in-depth page about Project Sharing click here

Online Editor
One can share a project from either the unshared project's page or directly in the editor.

From an unshared project page, a user can click the "share" button in an orange bar above the project, as shown:

In the project editor, in the top-right corner adjacent, the project page button is a "Share" button which appears for an unshared project. Clicking this will share the project, opening the project page as well.

Offline Editor
In the offline editor, to share a project, click "File > Share to website" then enter the details. Then wait for a message that says "Successfully uploaded to scratch.mit.edu!"

Remixing
The Scratch Website is filled with many projects. Feel free, if you find any cool projects, to remix them. Follow these simple steps to do so.  Press the "See Inside" button in the corner of the project. Edit the scripts inside of the project to make it your own. Press the orange remix button in the top-right corner. The edited project is yours! 

What Now?
One possible way to advance a beginner's knowledge with Scratch is by playing around with it. Trying out different blocks, testing tools in the paint editor, and seeing all the nifty sound editor features can help one learn more about the program. Resources such as the Scratch forums and Scratch Wiki can be utilized as help when necessary. Creating many quality, hard-worked projects is arguably the best way to learn about Scratch.

Tutorials
You can also check out some video tutorials on Scratch. There are a wide variety of tutorials you can choose from that range from how to make your sprite move to making your own story! Here is a link to the tutorials.