A costume is one out of possibly many "frames" or alternate appearances of a sprite. Sprites can change their look to any of its costumes. They can be named, edited, created, and deleted, but every sprite must have at least one costume.
- Main article: Backdrops
While sprites contain costumes, the Stage contains backdrops. They can be used in the same way, while mistaking a background block (only accessible from the Stage, but can be dragged into a sprite) for a costume block can cause a red border (a script error notice) to appear around the active script, and vice versa.
There are four main ways of getting a costume or background for a sprite or stage.
- Drawing one yourself using the inbuilt Scratch Paint Editor, by clicking on the costume or background tab, and clicking the "paint" button
- Getting an image or multiple images that exist as files on the computer, either by clicking the "import" button under the costumes tab, or dragging in an image or images from an open folder. Dragging an animated .gif file from a folder into Scratch will split the gif into many costumes so the gif can be played using the Next costume block.
- Taking an image from a webcam, by clicking the "camera" button (added in 1.4)
- Right clicking on a sprite and selecting "grab screen region for new costume" which enables you to define an area of the Scratch client to become a new costume (this can't be done for the stage, as this will create a new sprite instead)
Clicking the "X" button towards the lower right of each costume will delete it, provided that it isn't the only costume of the sprite.
There are four blocks that relate to costumes, which are as follows:
- The first block is used for the sprite to transfer its look between any of its costumes. The drop-down box shows all of the sprite's costumes, with more than one page if the count exceeds 33.
- The second block is mainly used in animation. A block that does the opposite has been suggested, but it can simply be done with the following code:
switch to costume ((costume #) - (1))
- The third block contains the number of the current costume being used. It can be read through other blocks, and specific actions can be taken.
- The fourth block contains two drop-down boxes. The first allows you to read a sprite's X Position, Y Position, direction, costume number, size, and volume; while it can also read the Stage's background number and volume.
This block can be read from the Stage and all sprites.
Example of the next costume/switch to costume()
To see the costumes of a sprite, click on the Costumes Tab. This will display a list of the costumes in the sprite, as well as open the paint editor.