WEBVTT 00:00:07.090 --> 00:00:13.890 In this video we are going to write code corresponding to clicking on the new button the Rizzio button 00:00:13.980 --> 00:00:15.500 and the pause button. 00:00:15.910 --> 00:00:16.760 OK. 00:00:16.980 --> 00:00:20.210 So let's go ahead and do this. 00:00:20.220 --> 00:00:22.490 So let's start with the New button. 00:00:22.620 --> 00:00:35.070 So let's access the button first using ID and you are going to use the click method which will take 00:00:35.070 --> 00:00:37.310 a function. 00:00:38.880 --> 00:00:41.890 So if we click on this puzzle what are we going to do. 00:00:41.940 --> 00:00:43.800 We are going to reload the page. 00:00:44.350 --> 00:00:45.050 OK. 00:00:45.150 --> 00:00:54.530 So as we done before to reload the page the code is location that reload OK. 00:00:55.350 --> 00:00:58.170 Save and try this 00:01:04.790 --> 00:01:05.890 perfect. 00:01:05.940 --> 00:01:08.700 Now let's move to the pause button. 00:01:09.660 --> 00:01:19.660 So if we click on the pause button we want to hide the pause button and show the button. 00:01:19.710 --> 00:01:22.140 Also we want to stop the reading. 00:01:22.740 --> 00:01:28.480 So is access the button using its ID pause. 00:01:29.360 --> 00:01:30.180 OK. 00:01:30.840 --> 00:01:38.480 So first of all we are going to stop reading and if we stop reading we need to switch to the not reading 00:01:38.490 --> 00:01:39.650 mode OK. 00:01:39.860 --> 00:01:43.520 Let's switch to the reading mode. 00:01:44.740 --> 00:01:55.870 So stop reading we are going to use the clear interval function applied to the action variable. 00:01:56.520 --> 00:01:57.980 All right. 00:01:58.260 --> 00:02:06.000 And to change the reading mode to add on reading We're going to go to the reading variable k and set 00:02:06.000 --> 00:02:09.630 it to False. 00:02:09.630 --> 00:02:12.830 Now let's hide the pause button. 00:02:12.830 --> 00:02:13.110 OK. 00:02:13.110 --> 00:02:14.130 And so there is your button 00:02:21.240 --> 00:02:27.430 so we can access the pause button. 00:02:27.490 --> 00:02:30.700 Hide it to us. 00:02:30.700 --> 00:02:33.400 Here's the Resume button. 00:02:33.750 --> 00:02:34.260 Show it 00:02:36.970 --> 00:02:40.190 . 00:02:40.790 --> 00:02:44.340 Notice most of the reads You mustn't we click on this button. 00:02:44.340 --> 00:02:51.690 We show the pause button and we hide there is your button OK and we go back to reading mode and we start 00:02:51.690 --> 00:02:52.550 reading as well. 00:02:52.830 --> 00:02:59.430 OK so let's access the button using ID with you. 00:03:00.870 --> 00:03:03.230 OK. 00:03:03.270 --> 00:03:10.030 So we're going to start reading. 00:03:14.370 --> 00:03:17.080 OK. 00:03:19.440 --> 00:03:29.120 So it start reading we are going to use the action variable the same way we have done that. 00:03:29.250 --> 00:03:29.780 OK. 00:03:30.030 --> 00:03:37.600 So we're going to use the interval function applied to the read function or the frequency. 00:03:37.680 --> 00:03:38.480 OK. 00:03:39.090 --> 00:03:41.730 Also we're going to go back to the reading mode 00:03:45.330 --> 00:03:51.870 so that we get assess the reading variable to true. 00:03:56.350 --> 00:03:57.320 OK. 00:03:57.420 --> 00:04:07.370 And finally we are going to hide the receive button and show the pause button. 00:04:10.800 --> 00:04:11.790 OK. 00:04:11.790 --> 00:04:14.150 So let's try this. 00:04:14.640 --> 00:04:16.330 Is Save As. 00:04:16.350 --> 00:04:16.800 And 00:04:19.500 --> 00:04:23.900 item sexta. 00:04:27.600 --> 00:04:27.960 OK. 00:04:27.960 --> 00:04:34.140 Now if we click on the pause button here can see there is your buzzer and appearing and we stops reading 00:04:34.150 --> 00:04:34.330 . 00:04:34.620 --> 00:04:39.800 If we click on the button we see the pause button and we are back reading. 00:04:40.460 --> 00:04:41.730 OK. 00:04:42.610 --> 00:04:46.050 OK so in the next video we're going to move to the slightest