Stage
The stage: the single backdrop-bearing target that also owns the project's
broadcasts. Extends Target, so its backdrops are just
"costumes", and variables defined on it are global. This page covers the
stage-specific additions.
Get the stage from project.stage.
Accessors
stage.isStage
- Type:
true(getter) — alwaystrue. DiscriminatesStagefromSpritein the union.
stage.tempo
- Type:
number(get/set) — tempo for music blocks, in BPM. Default60.
stage.videoState
- Type:
string(get/set) — video input state:on,off, oron-flipped. Defaultoff.
stage.videoTransparency
- Type:
number(get/set) — video transparency, 0–100. Default50.
Broadcasts
Broadcast messages are project-wide and owned by the stage.
stage.broadcastNames
- Type:
string[](getter) — names of all broadcast messages in the project.
stage.addBroadcast(name)
name:string- Returns:
string— the broadcast's id.
Add a broadcast message if it does not already exist (idempotent). The id is
derived as broadcastMsgId-<name>.
Inherited from Target
Costumes (backdrops), sounds, variables, lists and blocks all come from
Target. Note that because the stage's costumes are the
project's backdrops, addCostume / removeCostume manage backdrops: