(Redirected from Flag)

"Flag" redirects here. For an article about a feature previously called flagging, see Report.
The Green Flag is clicked in this location.
The green flag icon

The Green Flag is a programming feature that, when clicked, will start all scripts in that project that are hatted with the When Green Flag Clicked block. More simply, this flag starts the project. ⇧ Shift clicking the green flag will activate Turbo Mode.

In Scratch 2.0, Ctrl clicking would mute the project so that the project could not produce any sound ( click on a Mac). In the Scratch 1.4 offline editor, pressing the ↵ Enter key on a keyboard would also start all green flag scripts, when not prompted for input by the Ask () and wait block.

Frequency

The green flag is one of the most used buttons on Scratch, since every time a Scratcher wants to test their project they use the green flag button.

Importance

when gf clicked
The When Green Flag Clicked block has the green flag icon on it.

Without the flag, no Scratch projects would be able to run unless a key was pressed, a sprite was clicked, or a When () is Greater Than () hat block was triggered to activate the scripts. While creating a project is fully possible without the flag, it is not recommended and most users use the green flag.[1]

Examples of projects which do not use the Green Flag block are:

  • Projects which just share an image
  • Slide shows where only key presses need to be used to move the images

Stop Sign

Main article: Stop Sign

The Stop Sign is the opposite of the flag; a project will end and fully stop all scripts when it is clicked or the Stop () block is used with the "all" option. Some people have suggested a "When stop sign clicked" block, however this has been rejected by the Scratch Team.[2]

History

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.

In Scratch 11Oct03, the first version of the flag was a purple button, multiple of which could be created for each script. It was then changed to a green play sign that "shouted" "go" and "setup" when clicked (later replaced with sending messages) in 13Oct04. After that, it was changed to a start button in 28Feb05, and in 14Mar05 a "when Start clicked" block was added. It stayed that way until Scratch 28May05 when it was turned into a green flag as it is today. In Scratch 1.4, the green flag and stop sign were made smaller.

In Scratch 1.4 and the online Java Player, the flag was activated when broadcasting scratch-startclicked, and vice versa. As this was never a planned feature, the Scratch Team rejected the idea of implementing it into the Flash Player, and as such, this feature does not work in Flash Player.[3]

Custom Block Insertion

Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.

In older versions of Scratch 2.0, the Green Flag icon could be placed into custom blocks and variables by adding the text "@greenFlag" to the custom block name.

GreenFlagTrick.png

A similar trick could be done with the stop sign by adding the text "@stop" to a custom block.

Requesting multiple clicks

Many Scratchers suggest clicking on the green flag multiple times, rather than once, to start a project. This improves the sync of any When Green Flag Clicked blocks present in the project, and ensures that all of the scripts within the project line up correctly.[citation needed]

See Also

References

  1. griffpatch's Cloud Platformer Multiplayer Fun mentions the block 18 times.
  2. post:2070854
  3. Lightnin. (22/02/11). "The broadcast message scratch-startclicked doesn't trigger scripts with a "when green flag clicked" hat block. Note: This was never an official feature of Scratch and will not be implemented in the Flash viewer." ar-post:680190
Cookies help us deliver our services. By using our services, you agree to our use of cookies.