This week we did the first week of the Magnify Project, there will definitely be Part 2 and maybe Part 3.
The Magnify project is designed to allow you to create your own detailed Map of something, by magnifying part of the screen to view more information and then Magnify part of that screen to dig even deeper in to your Map.
For example, you might start with an image of the Solar System, showing all the Planets, then you can click on a Planet to see more details. If you clicked on the Earth for example you would be able to see all the countries, and maybe click on a Country to see even more information.
Part 1.
For Part 1 all we did was build a framework with 2 coloured squares that you could click on to Zoom in/Zoom out of.
The code in both squares is identical apart from the Values given to 5 (or 6!) Variables that were defined for that Sprite only.
The Variables are:
MyName – Who am I
MyParent – Who is my Parent
MyLevel – What level do I belong to
MyX – Where am I on the screen
MyY – Where am I on the screen
MyText – What should I say when the Mouse is on me.
Once all these variables are set correctly for each Sprite everything will simply work. For example these are the values that we used for the 2 example Sprites:
| Sprite | MyName | MyParent | MyLevel | MyX | MyY | MyText |
| Sprite1 | Sprite1 | 1 | 100 | 100 | Click Me | |
| Sprite2 | Sprite2 | Sprite1 | 2 | 0 | 0 | Click Me Too. |
You can see that the second Sprite has Sprite1 as the Parent and is a level 2 which is one below Sprite1, these variables basically tell each Sprite whether it should be on show and what size it should be.
To see how it works have a look at the example project on the Scratch Web Site:
https://scratch.mit.edu/projects/1004906611
If you have any questions either here, or make a comment on the project on the Scratch Web Site.
Process
Once the Framework is in place, it is quite easy to add extra levels or sprites at the same level, basically copy either the Parent sprite or another Sprite at the same level you want. Update the Costume with your new image, then simply change the Variables so it has the correct Parent and Level information and it should all work.
AND Homework for next week!
Have a think about what you want to Magnify and see if you can gather some images to use. The more images you have the better the project will end up.