In the Scratch Player, sprites are prevented from moving off the edge of the screen; if one tries to make a sprite do so by setting its x or y position to a very large positive or negative number, the sprite will be unable to move completely off of the Stage.
However, it is possible to move a sprite completely off the screen by using a trick involving different costumes. There are multiple ways to pull off this trick, one of which is detailed below.
First of all, make two new costumes. Leave one of them blank, and fill the other one entirely using the Bitmap fill bucket (so that its width is 480 pixels and its height is 360 pixels). If other costumes are needed, create them; they are not subject to any requirements.
Next, create the following script:
when gf clicked ... // if the sprite must do stuff before being moved switch costume to [blank costume v] set size to (10000)% // or some similarly high number switch costume to [completely filled costume v] go to x: (2000) y: (2000) // or whatever position the sprite must be in set size to (100)% // if the sprite's size needs to be reset ... // the rest of the sprite's code after it's moved
A quick rundown on how the above script works:
It first uses a technique that can set a sprite's size to an arbitrarily large number. Basically, an empty costume's size can be set to any number between 100 and 54,000, and changing a sprite's costume does not change its size. This means that, by switching a sprite's costume to the empty costume, setting the size, and then switching back, a sprite can be set to practically any size that is needed.
Next, it exploits the different x and y position limits of different costumes and the fact that a sprite's costume changing will not change its x or y position. A larger costume can move farther off of the screen than a smaller costume, simply because it is larger; this fact can be magnified by using the set size block as shown previously.
This effect can also be created by using Custom Blocks set to 'run without screen refresh so that the size changing is not seen by the viewer. The code would therefore be this:
when green flag clicked ... // Moving the sprite to the edge of the screen Go off the edge of the screen define Go off the edge of the screen:: switch costume to [blank costume v] set size to (10000)% // or some similarly high number switch costume to [completely filled costume v] go to x: (2000) y: (2000) // or whatever position the sprite must be in set size to (100)% // if the sprite's size needs to be reset ... // the rest of the sprite's code after it's moved
With this method the way of getting the sprite off the screen is the same, but it may look more polished.