This is a game building block and all code blocks have been commented. This provides an example of how to display an infinitely scrolling message. The example was created to celebrate Code Club's 8th Birthday on the 16th April 2020. The message scrolls across the bottom of the stage from the right hand side and is generated from a single sprite. Once the whole message has been shown it is repeated. The message is stored in a variable and after the green flag has been clicked the message will appear. The message is created by cloning a single sprite that contains costumes for the letters A to Z, 0 to 9, a space and a heart. When started a clone of the sprite representing the first character of the message is created. The appropriate costume is selected and it is placed on the right hand side of the stage. From here every time it receives a "Scroll Message" broadcast the sprite is moved 5 places to the left. If after this the sprite has reached the left hand side of the stage the clone is deleted. For the next character in the message to be created a variable is set once the current sprite has stopped touching the right hand edge of the stage. Once received the next sprite clone is created and the pattern is repeated.
Click the green flag to start the message scrolling across the stage.