CLEAR ALL
BITMAP 1 LOAD SHEET "sheet.xml" STRIP ".png"
sn$=BITMAP.SHEETNAMES$(1)
c=PARSECOUNT(sn$)
i=1
DO
    n$=PARSE$(sn$,i)
    CLS
    INK RGB(255,255,255)
    PRINT "Press LEFT/RIGHT arrow keys to cycle through the sprite sheet, ESC to quit."
    PRINT
    INK RGB(255,255,0)
    PRINT STR$(i)+" of "+STR$(c)+": "+n$
    INK RGB(255,255,255)
    SPRITE 1 BIND BITMAP 1 SELECT n$ SHOW XYSIZE 4,4
    GETKEY a$
    SELECT CASE a$
        CASE CHR$(VK_LEFT)
            IF i>1 THEN i=i-1
        CASE CHR$(VK_RIGHT)
            IF i<c THEN i=i+1
        CASE CHR$(VK_ESC)
            EXIT DO
    END SELECT
LOOP
