Sprite Properties

If you think of a sprite as a collection of values that represents an object in the real world, then the properties of a sprite are like variables that hold all of those values. Some of the most common sprite properties include:

Dot Notation

Notice that all of the examples above follow a common pattern of sprite label . sprite property. We call this format dot notation. The first part will always be unique to the sprite that you want to modify, and the second part will always be one of the properties common to all sprites.

Reading and Writing Properties

Sprite properties, like variables, are values that sometimes we want to just read, and sometimes that we want to write to. When you drag out a sprite property it will take out a different form depending on whether you are reading its value, or writing it.

In the first image above the sprite.x block is being dragged into a place where it is being read, so it keeps it's normal form.

In the second image, the sprite.y block is being dragged onto a new line where it will be written to, so it's changed into the form sprite.y = ___.

Found a bug in the documentation? Let us know at documentation@code.org