This app puts a picture of a homework book on the screen. Without doing anything, the book spins and shrinks until it disappears into a black hole background image. A flushing sound effect plays while the book is disappearing.
1 fill('black hole')
Line 1 puts a background image of a black hole on the screen.
'black hole' is the label of the graphic we want the app to use.
2 time = 3000
Line 2 creates a new variable called "time" and assigns it the value 3000.
This variable will be used on lines 5 and 6.
3
Line 3 is left blank to create visual spacing in the code.
4 h = stamp('homework',500)
Line 4 stamps a homework book on the screen and assigns it the name "h".
'homework' is the label of the book graphic we want the app to use.
500 is the size of the book on the screen, in pixels.
5 h.rotate(1080,time)
Line 5 tells "h" (which is the book) to rotate.
1080 is the number of degrees it should rotate, which equals 3 full rotations.
The value of time is 3000, so the book rotates for 3000 milliseconds (3 seconds).
6 h.size(0,time)
Line 6 tells "h" (which is the book) to change size.
0 is the size (in pixels) it should end up when it's finished.
The value of time is 3000, so the book shrinks to 0 in 3000 milliseconds (3 seconds).
7 sound('flush')
Line 7 plays a sound.
'flush' is the label of the sound file we want the app to use.