积木——“当按下/放开( )键”
-
先修科目
介绍
积木“当按下( )键”和“当放开( )键”属于事件类别的帽子积木。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/3dbbaec4-bbbd-4235-b595-091c4d7f8f16.png" width="650" style="">
积木:当按下( )键
当在键盘上按下选定的键,这个积木就会运行它下面连接的积木。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fb7c42e3-a97f-48dc-96da-c76e9c66f194.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
积木:当放开( )键
当在键盘上放开(松开)选定的键,这个积木就会运行它下面连接的积木。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f06e9a9e-834c-4329-907e-de536b12660e.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
如何选择不同的键?
选择不同的键:点击积木上的下拉菜单,
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/1132c465-132e-47ba-b447-1d12336857d7.png" width="170" style=""> 然后就可以从弹出的键盘上选择任意一个键。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/162ceff1-70f9-455c-af9e-82e25c330e89.gif" width="700" style="border-radius: 5px; border: 1px solid #29622d;">
如果一直按住键不放,会怎样?
如果一直按住键不放,积木“当按下( )键”将会一遍又一遍地重复执行,就相当于你重复按下这个键。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/02671e04-0e72-42d9-b295-3a9b188fd516.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
范例:按键、放开键控制跳舞动画
如下就是用这两个积木做的跳舞动画,“当按下( )键”用于启动动画,“当放开( )键”用于停止动画。
https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fd1338e2-5b40-4bc2-a6f2-49b4f499a077.gif" width="800" style="border-radius: 5px; border: 1px solid #29622d;">
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login