Press green flag to start. Press up arrow key to scroll up. Press down arrow key to scroll down.
Three sprites are used to cover the whole screen. One at top, second one in middle and third one at the bottom -there is also another backup middle sprite which you can choose not to use it if you have set the colour of the stage to the back ground colour of the scrolling screen. one variable(scrl) is defined to tell each sprite where to go to cover the whole screen all the time. We know length of y axis is 360, so if we want our sprite move 5 unites every time we press the up/down arrow key when the scrl is equal to 360 or -360 we need to set it back to 0. now we need to set the position for each sprite, using the variable we have created. Initial condition: The middle sprite starts at x=0 and y=0. The top sprite at top should start at x=0 and y=360 to look connected to the middle one. The bottom sprite should start at x=0 and y=-360 likewise. The y location of the middle sprite should be set to the variable we have set. The y location of the top sprite should be set to 360+scrl.( the lower part of the sprit will be placed at y=180+scrl, so its centre should be set to 180+180+scrl which is 360+scrl.) The location of the bottom sprite should be set to -360+scrl.( the lower part of the sprit will be placed at y=-180+scrl, so its centre should be set to -180-180+scrl which is -360+scrl.)