SecondBASIC Documentation v3

Home / Command Reference / Scroll

Scroll

Description: Scrolls the active background plane relative to its current position.

Syntax:

Scroll <Direction>, <Quantity> [, <Cell>]

Part Description
<Direction> Required. Sets the direction to shift the background plane. Valid values are:
  • Up
  • Down
  • Left
  • Right
<Quantity> Required. Amount of pixels to shift the background plane.
<Cell> Required if the scroll mode is HSCROLL_CELL, HSCROLL_LINE, or VSCROLL_2CELL.

If the scroll mode is HSCROLL_CELL, then <Cell> indicates which horizontal cell will be scrolled.

If the scroll mode is HSCROLL_LINE, then <Cell> indicates which line to scroll.

If the scroll mode is VSCROLL_2CELL, then <Cell> indicates which cell to scroll. <Cell> here is 16 pixels wide.

Example:

    DrawTile 1,0,0
    For i = 0 TO 10
        Scroll Down, 1
        Sleep 1
    Next