Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more.

Transcript

To create a response text message from your friend, click on the friend sprite.

When you send a text you see each character you type one at a time on the screen.

When you receive a text, you see the full message all at once when it arrives.

To program your friends response drag out a say block and type what you imagine your friend would say.

Try it out!

Great, the friend sprite says the response.

Next, make a sound play when the text message arrives.

Click the sounds tab and choose a sound from the library.

Once you select a sound click the sound menu.

Drag a play sound block above the say block to play the sound before the massage shows.

Try it out!

The sound plays as the message appears, but this happens only when you click the stack to test it.

Next, make the message appear as a result of the message sent by the You sprite.

Select the You sprite.

Click on the events menu.

Drag out a broadcast and wait block and snap it on to the end of the block stack.

Broadcast blocks allow a sprite to send a message to other sprites telling them that it's time to run a specific stack of code.

This broadcast and wait block will send a message to the friend sprite that it's time to send a response.

The program will wait until the friend sprite completes running the code before running the next block in the stack.

Click new message and enter the message name too.

Next, instruct the friend sprite to respond to this broadcasted message.

Click, on the friend sprite drag out a when I receive block and put it at the top of the stack and choose two from the drop down menu.

When the flag is clicked the You sprite says a line then broadcasts to the friend sprite that it's time to talk.

The friend sprite says a line then the You sprite continues any additional code.

Try it out!

Great!

The You Sprite talks, then the friend sprite responds, but the friend sprite responds really fast Select the friend sprite and add wait blocks to make it look like your friend is really taking a second to type a message back.

Now it's your turn.

Create your friend's response using, when I receive, say, play sound, and wait blocks.

Tell the friend sprite it's time to talk using a broadcast and wait block.

Instructions
  1. Create your friend's response using "When I receive," "say," "play sound," and "wait" blocks.
  2. Tell the friend sprite it is time to talk using a "broadcast and wait" block.
Attributions
  • "Is this the future of typing on your smartphone" by Tabz Torque (https://www.youtube.com/watch?v=dPcjTxuDaaM) -- Licensed by Creative Commons Attrbution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode)
  • "Modern Smart Phone Emergency Text Message.png" by Chris.rider81 (https://commons.wikimedia.org/wiki/File:Modern_Smart_Phone_Emergency_Text_Message.png) -- Licensed by CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/deed.en)