RosettaCodeData/Task/Animation/Liberty-BASIC/animation.basic

35 lines
648 B
Plaintext

txt$ = "Hello World! "
txtLength = len(txt$)
direction=1
NoMainWin
open "Rosetta Task: Animation" for graphics_nsb as #demo
#demo "Trapclose [quit]"
#demo "down"
#demo "Font Verdana 20 Bold"
#demo "When leftButtonUp [changedirection]"
timer 150 , [draw]
wait
[draw]
if direction then
txt$ = right$(txt$, 1);left$(txt$, txtLength - 1)
else
txt$ = right$(txt$, txtLength - 1);left$(txt$, 1)
end if
#demo "discard"
#demo "place 50 100"
#demo "\";txt$
wait
[changedirection]
direction = not(direction)
wait
[quit]
timer 0
close #demo
end