Zmiany

Skocz do: nawigacji, wyszukiwania

Module 8 - The “Multimedia Christmas Card” Project

Dodane 4985 bajtów, 20:09, 7 lip 2015
/* Files to download */
[[Plik:A44.png|center]]
 
[[Plik:A44.png|center]]
 
===Developing card scenarios by the students===
'''Scene 1'''
A house in winter scenery, with a chimney on the roof.
 
[[Plik:Dom.png|center]]
 
 
'''Scene 2'''
After a specified time, e.g. 1 second, the chimney is zoomed in on. Santa Claus comes flying with a bag of presents and falls down the chimney.
 
 
[[Plik:Komin.png|center]]
 
'''Scene 3'''
A room with a fireplace. Santa Claus comes out of the fireplace with a bag of presents.
 
 
[[Plik:Pokoj.png|center]]
 
 
'''Scene 4'''
Christmas greetings. Christmas tree and greetings (“Merry Christmas from the Masters of Coding”).
 
 
[[Plik:A46.jpg|center]]
 
The animated Santa Claus falling down the chimney and coming out of the fireplace into the room will be sprites with multiple costumes. Preparing the card we load the first three scenes into a Scratch project (files ''dom.png, komin.png, pokoj.png,'' respectively), we prepare the fourth – a Christmas tree and the words of the greetings – in an image editor (sample file ''zyczenia.png''. We create two sprites, load appropriate files as costumes (for Santa Claus falling down the chimney these files are ''do_komina1.png,'' ..., ''do_komina9.png'', and for Santa Claus entering the room the files ''z_komina01.png, ..., z_komina12.png'').
 
 
[[Plik:kostiumy.png|center]]
 
 
[[Plik:A54.png|center]]
 
 
After starting the card, or clicking the green flag:
1. We hide all the sprites.
2. We display the first scene.
3. After 1 second we switch to the second scene and we start the animation –Santa Claus falling down the chimney. As the animation will be started by an appropriate sprite script, it must receive the message that it needs to do this.
4. Similarly, after the completion of the first animation, we send a message changing the stage to the third scene and triggering the second animation.
5. After the completion of the second animation we display the greetings stage.
 
Stage script:
 
 
[[Plik:A47.jpg|center]]
 
 
Sprite scripts – Santa Claus falling down the chimney:
 
 
[[Plik:A48.jpg|center]]
 
 
Sprite scripts – Santa Claus entering the room:
 
 
[[Plik:A49.jpg|center]]
 
 
As a simple additional exercise we can suggest a modification of the last scene (students design their own scene).The design does not include any sound effects, so we can also ask students to add them.
 
 
====Sample scenario II:“We Light the Lights on the Christmas Tree”====
 
 
 
In this scenario the students can prepare all the artwork themselves. In the example, the Christmas tree drawing was downloaded from the website ''openclipart.org''.
 
 
'''Scene 1'''
On the left side of the stage there is a Christmas tree as a background element (it can be drawn by students in the image editor).There are several (six in the sample project) lights (sprites) on the Christmas tree. Clicking a light with the mouse starts the animation – lighting of the light.
 
 
[[Plik:Scr_old_p_8_4.png|center]]
 
'''Scene 2'''
After all the lights have been lit there is a change of scene. The Christmas tree with flashing lights remains, Greetings appear 9”Merry Christmas from the Masters of Coding”).
 
[[Plik:A46.jpg|center]]
 
 
[[Plik:A51.png|center]]
 
 
When we click on the lights we must recognise two situations:
1. Is the light already on or not? For each light, this information must be saved separately, so we need to create a local variable (only for this sprite), e.g. called ''Lit''.
2. Have we switched on all the lights already? Here we will need a global variable that counts switched on lights, e.g. called ''Counter''.
 
After starting the card, or clicking the green flag:
1. We set the first stage as active, we reset the counter, we set the first costume for thelights, we reset the ''Lit'' variable (let zero mean that the light is not blinking).
2. Each click on a light causes the programme to check whether the value of the ''Lit'' variable is zero.
If so, then:
* we increase the counter by one;
* we set the switching on to one;
* if the counter is equal to the number of lights, we change the scene;
* we run the animation (blinking lights).
 
Stage script:
 
[[Plik:A52.jpg|center]]
 
 
Scripts for the light:
 
 
[[Plik:A53.jpg|center]]
 
The sample project, like the previous one, does not contain any sound effects, it is worth completing it by adding them.
 
==Files to download ==
 
<gallery mode="packed-hover" perrow=0 caption="Santa is jumping into the chimney">
File:do_komina1.png|do_komina1
File:do_komina2.png|do_komina2
File:do_komina3.png|do_komina3
File:do_komina4.png|do_komina4
File:do_komina5.png|do_komina5
File:do_komina6.png|do_komina6
File:do_komina7.png|do_komina7
File:do_komina8.png|do_komina8
File:do_komina9.png|do_komina9
</gallery>
 
 
<gallery mode="packed-hover" perrow=0 caption="Santa is coming into the room">
File:z_komina01.png|z_komina01
File:z_komina02.png|z_komina02
File:z_komina03.png|z_komina03
File:z_komina04.png|z_komina04
File:z_komina05.png|z_komina05
File:z_komina06.png|z_komina06
File:z_komina07.png|z_komina07
File:z_komina08.png|z_komina08
File:z_komina09.png|z_komina09
File:z_komina10.png|z_komina10
File:z_komina11.png|z_komina11
File:z_komina12.png|z_komina12
</gallery>
197
edycji