Aquarium
Aquarium
9. Click on Effects.
13. Now, lets drag the code blocks to make the bubbles play in the background. Click on the Control category. Next, drag the when flag clicked script to the scripting area.
14. Next, drag the Forever code block below When flag clicked.
15. Now, drag play sound Bubbles until done inside the forever block.
16. Before we put some fish sprites in the aquarium, lets delete the cat sprite. Hold down your mouse on the cat and select delete.
17. Now click the choose new sprite from file button.
19. Shrink the fish by pressing the shrink Sprite button and clicking on the fish.
20. To move the fish, click your mouse on the water (or anywhere away from the fish) and then click back on the fish and drag it where you want.
21. Now, lets drag the code to make the fish move around the aquarium. Click on the Control category and drag the when flag clicked code block.
22. Next, drag the Forever code block below When flag clicked.
24. Drag the Move 10 steps code block inside the forevercode block .
25. Replace the number 10 in the move 10 steps block with the number 2.
26. Now lets test out the script youve created. Click on the green flag and watch your fish swim! Press the red stop sign when youre done watching.
27. Youll notice that your fish doesnt stop swimming when it reaches the edge of the aquarium-it keeps going until it disappears! Thats no good. Lets drag a code block below move 2 steps that tells the fish to bounce off the edge.
28. Test out your code again by pressing the green flag. If youre fish bounces, youre done!
29. Finally, lets save our project. Click File --> Save.
30. Name your project LLahana188 Aquarium (except use YOUR first inital and last name instead).
Youre Done!
10
in step #18 you chose fish2 to place in your aquarium. This time, choose fish3 or try an octopus, starfish or whale!
32. Now, with your new fish, repeat steps 20-28. One change: have your fish move 3 or 4 steps at a time instead of 2. Your work should look something like what you see below:
11