1 00:00:00,000 --> 00:00:00,130 2 00:00:00,130 --> 00:00:02,740 >> SPEAKER: Thus far, Scratch has pretty much been on autopilot. 3 00:00:02,740 --> 00:00:06,670 Let's make this program a little more interactive, such that Scratch will 4 00:00:06,670 --> 00:00:11,060 only meow when I pet him, as by moving my mouse cursor over the cat. 5 00:00:11,060 --> 00:00:12,260 >> Let's begin. 6 00:00:12,260 --> 00:00:17,510 When green flag clicked, forever, let's do the following. 7 00:00:17,510 --> 00:00:25,120 If I detect that the mouse pointer is over the cat, I need to sense that. 8 00:00:25,120 --> 00:00:28,190 So let's grab the touching Boolean expression. 9 00:00:28,190 --> 00:00:30,200 Change it to mouse pointer. 10 00:00:30,200 --> 00:00:36,280 So if while doing this forever, the sprite is touching the mouse pointer, 11 00:00:36,280 --> 00:00:40,140 I want to go and meow like a happy cat. 12 00:00:40,140 --> 00:00:43,340 >> Let's give Scratch a moment to catch his breath as usual, upping the 13 00:00:43,340 --> 00:00:46,270 default one second to two seconds. 14 00:00:46,270 --> 00:00:48,836 Now let's click that green flag. 15 00:00:48,836 --> 00:00:50,000 Hmm. 16 00:00:50,000 --> 00:00:50,860 Nothing's happening. 17 00:00:50,860 --> 00:00:52,620 But that's because nothing's touching the cat yet. 18 00:00:52,620 --> 00:00:55,780 So let's move my mouse pointer over him. 19 00:00:55,780 --> 00:00:57,205 >> SCRATCH: [MEOWING]. 20 00:00:57,205 --> 00:00:58,155 >> SPEAKER: Hmm. 21 00:00:58,155 --> 00:00:59,580 >> SCRATCH: [MEOWING]. 22 00:00:59,580 --> 00:01:00,530 >> SPEAKER: Hmm. 23 00:01:00,530 --> 00:01:01,960 >> SCRATCH: [MEOWING]. 24 00:01:01,960 --> 00:01:03,210 That's a happy cat. 25 00:01:03,210 --> 00:01:04,342