In this add-on,
you'll program of fading transition,
to change scenes in your story.
To start, make a new backdrop that will show between scenes.
To do this, click on the stage,
then click on the backdrops tab.
Click, paint new backdrop to create your transition message.
Next, click the text tool to type your message.
This example types, later that night,
to show that there is a time lapse
between the beginning of the story and the next scene.
Write a message that fits your story,
like, the next day, two weeks later, or meanwhile.
Next, create a transition in which the scene will fade out
before the message shows and back in after it.
Drag out a change effect block.
Click the drop down to change the effect to ghost.
When you click this block, the stage fades and disappears.
To reset the stage, click the clear graphic effects block
in the looks menu.
To make a slower fading out effect, add a wait block,
to the change effect block and add a repeat loop
around this block stack.
Tinker with the values inside the change effect
and wait blocks to control how quickly
the stage fades out.
This example uses 10 in the change effect block
and .1 in the wait block.
Test it out.
Great, when the block side is clicked, the stage fades.
Next, make the stage fade back in
after the transition message shows,
so the next scene can begin.
Duplicate the repeat loop and change the value
in the change effect block
to a negative number, like -10.
When you test this, the stage fades back in.
Program the different backdrops to appear
at the right times in your story.
The first backdrop will show, then fade out.
The transition slide will fade in, then fade out.
Finally, the new backdrop or setting will fade in.
To make this happen, you could repeat
the different repeat loop block stacks
but that would make your code really long.
To simplify this, make two new blocks.
One for a fade out and the other for a fade in.
Click the my blocks menu and click make a block.
Name the block something that makes sense
for fade out effect like Fade Out.
Then, add the new defined block to the top
of the repeat loop for the change ghost effect
with a positive number.
Great, make another block called Fade In
and place the defined block at the top of a block stack
for the positive change effect block.
Drag out a fade out block from the more blocks menu,
and add a switch backdrop block from the looks menu.
Change the backdrop to the transition message you created.
Next, add a fade in block
to make the transition slide appear.
Add another fade out block and a switch backdrop block
to show the next scene.
And finally, add another fade in block
to make the backdrop appear.
Test your code.
Feel free to add a wait block
between the fade in and fade out blocks
to make sure the transition is on the stage long enough
for viewers to read it.
Prompt your transition effect using broadcast
and when I receive blocks.
Click back to your main character sprite,
add a broadcast message before the sprite changes scenes
and name the message.
This example uses opening night.
Then click back to the stage.
Add a when I receive block
and change the message to the correct name.
Finally, when the flag is clicked,
the stage should be on the first scene or backdrop.
So drag out a when flag clicked event
and add a switch backdrop block.
Change the drop down to the backdrop
for your stories first scene.
This is a difficult problem, keep trying to solve it
and don't get discouraged
if the first few solutions you try don't work.
Great, you created the transition
between the scenes in your story.
Now it's your turn.
Use a repeat loop, a change ghost effect and a wait block
to make a fading in and fading out effect.
Make two new blocks to reuse the fade in and fade out code.
Finally, program the different backdrops to appear
using the broadcast, when I receive, fade out, fade in,
and switch backdrop blocks.