[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.39,0:00:01.30,Default,,0000,0000,0000,,Hi everyone, Dialogue: 0,0:00:01.30,0:00:06.85,Default,,0000,0000,0000,,One of the most exiting things of a program \Nis that it can be interactive. Dialogue: 0,0:00:06.85,0:00:12.44,Default,,0000,0000,0000,,Any time someone clicks, tabs or types something at a computer or phone, that generates a event. Dialogue: 0,0:00:12.44,0:00:16.43,Default,,0000,0000,0000,,and there is some code that decides what to do when an event occurs. Dialogue: 0,0:00:16.43,0:00:20.06,Default,,0000,0000,0000,,For example, you could have an eventhandler that sais Dialogue: 0,0:00:20.06,0:00:22.27,Default,,0000,0000,0000,,"when the mouse is clicked, play a sound". Dialogue: 0,0:00:23.58,0:00:25.66,Default,,0000,0000,0000,,Let's try an activity to see how it works. Dialogue: 0,0:00:25.66,0:00:28.26,Default,,0000,0000,0000,,Have you ever heard of the game Flappy Bird? Dialogue: 0,0:00:28.26,0:00:34.50,Default,,0000,0000,0000,,By using eventhandlers, you can learn how to program \Nyour very own custom version of Flappy Bird. Dialogue: 0,0:00:34.50,0:00:40.80,Default,,0000,0000,0000,,The code you write involves dragging and dropping blocks, \Nthat represents commands for the computer. Dialogue: 0,0:00:40.80,0:00:44.06,Default,,0000,0000,0000,,Drag and drop programming is the easiest way to learn... Dialogue: 0,0:00:44.06,0:00:47.06,Default,,0000,0000,0000,,It's even how university students learn how to code. Dialogue: 0,0:00:47.06,0:00:51.01,Default,,0000,0000,0000,,But under the hood, each block is represented by real code. Dialogue: 0,0:00:51.01,0:00:56.06,Default,,0000,0000,0000,,If you take a look at the workspace, there are some green blocks that are filled in for you. Dialogue: 0,0:00:56.06,0:00:57.87,Default,,0000,0000,0000,,These are event handlers. Dialogue: 0,0:00:57.87,0:01:04.82,Default,,0000,0000,0000,,If you want the bird to flap, when you click your mouse, you can do this by attaching the flap-block to the appropriate eventhandler. Dialogue: 0,0:01:04.82,0:01:08.71,Default,,0000,0000,0000,,And now in your game, whenever you click your mouse, the bird will flap. Dialogue: 0,0:01:08.71,0:01:15.41,Default,,0000,0000,0000,,In each puzzle of this activity, we will introduce new types of events as green blocks on the work space. Dialogue: 0,0:01:15.41,0:01:19.51,Default,,0000,0000,0000,,and you can decide the appropriate block to add in responds of these events. Dialogue: 0,0:01:19.51,0:01:23.62,Default,,0000,0000,0000,,When you see a arrow like this, you can change the settings, Dialogue: 0,0:01:23.62,0:01:26.62,Default,,0000,0000,0000,,like the sound to play when the bird touches the ground. Dialogue: 0,0:01:26.62,0:01:31.32,Default,,0000,0000,0000,,In the final puzzle, you will be able to create your own game and share it with your friends. Dialogue: 0,0:01:31.32,0:01:33.22,Default,,0000,0000,0000,,Have fun!