This command is identical to SHIFT UP, except for the fact that colours are rotated in the opposite direction, so that the second colour is copied into the first, the third to the second, and so on. With the final flag set to zero, all colours are eventually replaced with the last colour in the list.
SHIFT OFF
instruction: turn off all colour shifts for current screen
Shift Off
Use this command to terminate all colour rotations previously set by the SHIFT UP and SHIFT DOWN instructions.
Rainbow effects
So far, most of the screen effects in this Chapter take a colour index and change its value over a
set period of time. AMOS Professional offers an alternative system, where colour indexes are
changed depending on specific screen locations. This means that a single colour index can be
used to generate hundreds of colours in some spectacular rainbow effects. Before any rainbows
can be conjured up, their parameters must first be set.
SET RAINBOW
instruction: define a rainbow
Set Rainbow number,index,height,red$,green$,blue$
Try the next example before analysing how it works:
E> Set Rainbow 0,1,16,"(1,1,15)","","" Rainbow 0,56,1,255 Curs Off : Flash Off Locate ,12 : Centre "RED STRIPE"
Up to four different rainbows may be set up for later use, and SET RAINBOW is followed by an identification number for this rainbow, from 0 to 3.
The next parameter is the colour index that is to be changed, and only colours 0 to 15 can be affected. In practice, this colour can be assigned a different value for each horizontal screen scan line, if necessary.
Following this, the height parameter sets the size of the table to be used for colour storage, in other words, it sets the height of the rainbow in units, with each unit ready to hold one scan line of colour. The size of this table can range from 16 to 65500, but only the first 280 or so lines can be displayed on screen at once. So if your table is less than the physical height of your rainbow, the colour pattern will be repeated on the screen.
Finally, the Red, Blue and Green components of the rainbow colours are set up as strings, each within their own brackets. The last example leaves out any reference to the Green and Blue components, which is why the resulting effect is completely in the Red. These strings will be