(Redirected from Next Background (block))
Next Backdrop | |
next backdrop | |
Category | Looks |
Type | Stack |
Introduced in | 02Dec06 |
The Next Backdrop block is a Looks block and a stack block. The block changes the backdrop to the next in the list of backdrops, but if the current backdrop is the last in the list, the block will loop to the first.
The equivalent for a sprite is the Next Costume block, though sprites do not have an event hat block for changing costumes.
History
Prior to Scratch 2.0, this block was called Next Background and did not fire an event upon running. During 2.0 development, this block was also called "Next Scene". Prior to Scratch 3.0, this block was stage-only.
Example Uses
This block is mainly used in animation scripts, in which the stage will progress through its backdrops as with stop motion animation. The wait () seconds block is often used along with it to improve the animation speed.
Alternatively, it can be used for slideshow-style projects as shown below:
When [space v] key pressed next backdrop
Workaround
- Main article: List of Block Workarounds
This block may simply be replicated with the following code:
switch backdrop to (next backdrop v)
In Scratch 2.0, the Next Backdrop block was only available in the stage's block palette, but this workaround could also be used in sprites.
Also, because this block simply advances the backdrop number, the following code can do this:
switch backdrop to ((backdrop [number v]) + (1))
To get the effect of the nonexistent Previous Backdrop block, the addition can be changed to subtraction.
Removal
Many users have made suggestions about removing this block, insisting that its alternative is perfectly fine to use;[1][2] however, others have disagreed, saying that it saves lots of time and is handy for animation.[3][4]
See Also
- Backdrops
- Backdrop Name
- Backdrop #
- Next Costume
- Switch Backdrop to ()
- Switch Backdrop to () and Wait
- When Backdrop Switches to ()
- Stage
References
- ↑ iamunknown2. (2015-08-05). "Remove "next backdrop" block [title]" topic:139864
- ↑ monstermash3. (2017-04-29). "It's even easier to workaround next backdrop like this: switch backdrop to next backdrop" topic:252261
- ↑ nickeljorn. (2017-05-01). "These blocks are very useful in animations (Especially speed draws) and projects with clones." post:2588996
- ↑ awsome_guy_360. (2017-05-02). "But even so if that was the only one removed, you just took away an essential block for costume based animations, even since it does have a simple workaround it still is a extremely useful shortcut." post:2590134
For sprites |
Say () for () Seconds • Say () • Think () for () Seconds • Think () • Switch Costume to () • Next Costume • Switch Backdrop to () • Next Backdrop • Change Size by () • Set Size to ()% • Change () Effect by () • Set () Effect to () • Clear Graphic Effects • Show • Hide • Go to () Layer • Go () () Layers • Costume () • Backdrop () • Size
|
For the Stage |