Scratch for Java

Stage::ask()

Asks a question in a box along the bottom of the stage, as Scratch does, with a field to type the answer in. Enter or the check button finishes it: then isAsking() is false and getAnswer() has the answer. While a question is open, keys go to the answer box, not to the stage and its sprites.

Examples

View on GitHub

Syntax

Java

.ask(question)

Scratch

ask [question] and wait

Parameters

Name Data Type Description
question String the question

Return

void

ask()

Create Shareable URL

Select Sections