Saltar navegación

Activa JavaScript para disfrutar de los vídeos de la Mediateca.

09 if and if else - Contenido educativo

Ajuste de pantalla

El ajuste de pantalla se aprecia al ver el vídeo en pantalla completa. Elige la presentación que más te guste:

Subido el 22 de febrero de 2021 por David G.

216 visualizaciones

Descargar la transcripción

in today's video tutorial we're going to 00:00:00
be learning about how to use the 00:00:02
if statement blocks using the online version 00:00:04
of scratch as you can see a 00:00:06
new project open for the purpose of 00:00:08
today we're going to be using four 00:00:11
different tabs the looks tab events control 00:00:13
and then sensing i'm going to start off 00:00:17
by navigate 00:00:19
get into the control tab and selecting 00:00:20
the different blocks that will be using 00:00:22
those blocks are the if then block 00:00:24
and if then else block with 00:00:26
these blocks essentially we will be saying is 00:00:29
that if something happens such as our 00:00:31
mouse pointer is touching our cat sprite 00:00:35
then we want this action 00:00:38
then to occur 00:00:40
and in order to use this one 00:00:42
it's essentially the same but what we're 00:00:44
saying is if our mouse pointer 00:00:47
is touching the cat then we want 00:00:51
this action to occur otherwise we want 00:00:53
a secondary action to occur let's go 00:00:57
ahead and go back up to this 00:01:00
first block and look at that first 00:01:01
so in order to get a spot 00:01:04
to work we're going to need a 00:01:06
couple of things first we're going to 00:01:07
need the action that we want to 00:01:09
happen 00:01:11
let's go to looks and say that 00:01:12
we want 00:01:16
this sprite to hide when the mouse 00:01:18
pointer is touching it 00:01:22
what we need to do in order 00:01:24
to get this to work is we're 00:01:25
going to have to navigate to the 00:01:27
events and we can select when clicked 00:01:29
and scroll down to control and put 00:01:33
this in a forever loop 00:01:35
we're also going to need to go 00:01:38
back to looks and select show otherwise 00:01:40
when the mouse would be touching the 00:01:43
cat he would just be hidden forever 00:01:45
because of the forever loop so let's 00:01:48
go and select show 00:01:52
one things here 00:01:56
so when clicked 00:02:00
when clicked i want my cat sprite 00:02:05
to show and when my mouse pointer 00:02:07
is touching him i want him to 00:02:11
hide the simple as that now let's 00:02:12
go ahead and move on to the 00:02:16
next block 00:02:17
going to go ahead and throw back 00:02:18
that show and keep her forever whooped 00:02:21
throw this one back and we're going 00:02:29
to select the second if statement block 00:02:31
we're back in the forever loop 00:02:34
we're going to stick with this touching 00:02:37
mouse pointer 00:02:39
and we're going to say that we 00:02:41
want him to 00:02:44
hide 00:02:48
and then show 00:02:49
so when clicked 00:03:08
we want this cat to hide when 00:03:10
the mouse is hovering over it otherwise 00:03:13
we want it to show 00:03:16
and you can also do other things 00:03:19
with this as well we can swap 00:03:21
out the hide for let's say change 00:03:24
costume 00:03:28
or next costume 00:03:30
so when clicked 00:03:34
we want this cat to change it's 00:03:36
costume 00:03:38
when the mouse pointer is on it 00:03:41
otherwise we just want him to show 00:03:43
his regular costume the first one and 00:03:44
we know that the second costume would 00:03:47
be him running because we can navigate 00:03:49
to the animal sprites and we can 00:03:52
see by scrolling down here to the 00:03:55
cat 00:03:57
that when we hover over this we 00:04:01
see him moving 00:04:03
and that concludes our video tutorial for 00:04:05
today 00:04:07
Idioma/s:
en
Autor/es:
David Gonzalez Arroyo
Subido por:
David G.
Licencia:
Reconocimiento - No comercial - Compartir igual
Visualizaciones:
216
Fecha:
22 de febrero de 2021 - 15:04
Visibilidad:
Público
Centro:
IES MARIE CURIE Loeches
Duración:
04′ 08″
Relación de aspecto:
17:9 Es más ancho pero igual de alto que 16:9 (1.77:1). Se utiliza en algunas resoluciones, como por ejemplo: 2K, 4K y 8K.
Resolución:
1440x758 píxeles
Tamaño:
22.04 MBytes

Del mismo autor…

Ver más del mismo autor


EducaMadrid, Plataforma Educativa de la Comunidad de Madrid

Plataforma Educativa EducaMadrid