Your browser is not supported. Please upgrade your browser to one of our supported browsers. You can try viewing the page, but expect functionality to be broken.
CS in Algebra curriculum and content is being deprecated. Within the next few months, this lab will no longer be available. Please check out Bootstrap: Algebra instead. Learn More.
Hour of Code | Dance Party: Properties
My name is Maria I'm a junior at the University of Washington and I'm an Amazon Future Engineer.
I love computer science because it incorporates problem-solving and critical thinking and after putting hours of work into something you can get something really cool and rewarding out of it.
So far you’ve had a chance to play some different types of dancers and you've programmed them to do different types of dance moves. But how do these moves really work?
Every dance move is made up of a series of images called frames. Each frame is slightly different from the one before it. When your program runs, the computer shows one frame after another. They're shown so fast that it looks like the dancer is moving. This is the secret behind all animation.
Not only can you change your dancer's moves, you can also change a dancer's properties. Properties describe things like the dancer's position on the screen, the dancer's size, and the dancer's color.
To change the properties of a dancer you'll use a set block. Let's use a set block to make our dancers look smaller. First, drag the set block into your program.
Then, select a dancer you’d like to change, and type in the size they will appear on screen. Full size is 100. If you choose a lower number, that will make the dancer smaller. The smaller the dancer is, the further away it looks.
Using the set block, you can also change a dancer's dimensions, rotation, position and color. By playing around with these properties you can make all kinds of changes and link them to different parts of the song.
Remember, you can only set the properties of a dancer that already exists. Make sure that your set block comes after the "Make a new dancer" block. Feel free to experiment be creative, and have fun!