SecondBASIC Documentation v3

Home / Command Reference / Scroll2

Scroll2

Description: Scrolls the active background plane to an absolute position. The points where the absolute position is calculated from is (0,0).

Syntax:

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

Part Description
<Direction> Required. Sets the direction to shift the background plane. Valid values are:
  • Up
  • Down
  • Left
  • Right
<Quantity> Required. Sets the absolute scroll position.
<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
    Sleep 50
    Scroll2 Down, 10
    Sleep 50
    Scroll2 Up, 6