Here are 2 more examples, one dose not use a image, the other dose:
REM Simple Note player
DEFLNG A-Z
SCREEN 12
DO
Keycode& = _KEYHIT
SELECT CASE Keycode&
CASE IS = 97
PLAY "a10": Note$ = "A"
CASE IS = 98
PLAY "b10": Note$ = "B"
CASE IS = 99
PLAY "c10": Note$ = "C"
CASE IS = 100
PLAY "d10": Note$ = "D"
CASE IS = 101
PLAY "e10": Note$ = "E"
CASE IS = 102
PLAY "f10": Note$ = "F"
CASE IS = 103
PLAY "g10": Note$ = "G"
END SELECT
LOCATE 10, 10: PRINT Note$
None$ = INKEY$
LOOP UNTIL _KEYDOWN(27)
SLEEP
SYSTEM
----------------------------------------------
Backy& = _LOADIMAGE("Piano-01.png, 32)
Mixpage& = _NEWIMAGE(120, 92, 32)
Video& = _NEWIMAGE(600, 400, 32)
DO
GOSUB Unpressed
Keycode& = _KEYHIT
SELECT CASE Keycode&
CASE IS = 97
PLAY "a10": Note$ = "A": x1 = 1
CASE IS = 98
PLAY "b10": Note$ = "B": x1 = 17
CASE IS = 99
PLAY "c10": Note$ = "C": x1 = 33
CASE IS = 100
PLAY "d10": Note$ = "D": x1 = 49
CASE IS = 101
PLAY "e10": Note$ = "E": x1 = 65
CASE IS = 102
PLAY "f10": Note$ = "F": x1 = 81
CASE IS = 103
PLAY "g10": Note$ = "G": x1 = 97
END SELECT
IF Keycode& <> 0 THEN GOSUB Pressed
LOOP UNTIL _KEYDOWN(27)
SLEEP
SYSTEM
Unpressed:
_PUTIMAGE (0, 0)-(119, 91), Backy&, Mixpage&, (0, 0)-(119, 91) 'place backy to mix
_PUTIMAGE , Mixpage&, Video&
SCREEN Video&
_DISPLAY
RETURN
Pressed:
x2 = x1 + 15
_PUTIMAGE (x1, 79)-(x2, 89), Backy&, Mixpage&, (122, 0)-(137, 10) 'show key down
_PUTIMAGE , Mixpage&, Video&
SCREEN Video&
_DISPLAY
_DELAY .05
RETURN
You can use the attached image, for this. The above.
Yes Quark, you can attach the image, with the code,..
I have attatched the one, for the piano,...However The SMF, dose not accept BMP
Attach: (more attachments)
Allowed file types: doc, gif, jpg, mpg, pdf, png, txt, zip, jpeg, docx, xls
Maximum attachment size allowed: 1200 KB, per post: 8
So I changed it to a .PNG
You will either need to change it back to a .bmp or change the filename in the code:
Backy& = _LOADIMAGE("Piano-01.bmp", 32)
Change this to:
Backy& = _LOADIMAGE("Piano-01.png", 32)
From Garry