Shapes
Sprites
Movement
Control
What does it do?
100

Creates a 4 sided object

rect

100

Last code needed (yellow in color) to draw your sprite

drawSprites

100

Code to make movement to the right

sprite.x=sprite.x+1

100

To control a sprite, you must have this code inside your function

If

100

sprite.x=sprite.x+1

sprite moves to the right

200
Creates a round object

Ellipse

200

Code that can change where a sprite is from left to right

sprite.x

200

Code to make a sprite move up

sprite.y=sprite.y-1

200

Code that makes it so something happens when you hold down a key

keyDown

200

sprite.rotation=sprite.rotation-5

Sprite will rotate counterclockwise

300

The third number after you create your shape controls this

Width

300

Code that can change which direction your sprite is facing and turn it around

Sprite.rotation


300

All movement has to happen inside this code

Function

300

Keeps track of the location of the mouse from left to right.

World.mouseX

300

sprite.y=sprite.y(randomNumber 0,10)

Sprite will shake up and down in a random manner

400

Put this above your shape code to change its color

Fill

400

Replaces a number and allows you to change the number at will

Variables

400

This must be inside the Function in order for actual movement to happen.

drawSprite

400
Daily Double: How many DIFFERENT classes does Mr. Green teach a day?

6 (Coding, Speech, Computer Apps, Digital Media, Audio Visual Production, Visual Production at the High School)

400

if (keydown(space)){

       sprite.x=sprite.x-3}

       

Sprite will move to the left when the spacebar is pressed.

500

Code that Can Create any multi-sided shape you want.

regularPolygon
500

Code that can Make Your Sprites ¨see through¨

Alpha

500
Without this inside the function your sprites turn blurry and do not go very far
background


500

Allows someone to figure out if something is true or false in their code

Boolean Expression

500

if (World.mouseY>200)

   ( sprite.x=sprite.x-1)

else (sprite.x=sprite.x+1)

If the mouse is on the bottom of the screen, the sprite will move the left, if the mouse is near the top it'll move to the right.

M
e
n
u