Animation: Difference between revisions
Content added Content deleted
(Added Liberty BASIC example) |
(Edited LB example) |
||
Line 570: | Line 570: | ||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |
||
<lang lb> txt$ = "Hello World! " |
<lang lb> txt$ = "Hello World! " |
||
txtLength = len(txt$) |
|||
direction=1 |
direction=1 |
||
NoMainWin |
|||
open "Rosetta Task: Animation" for graphics_nsb as #demo |
open "Rosetta Task: Animation" for graphics_nsb as #demo |
||
#demo "Trapclose [quit]" |
#demo "Trapclose [quit]" |
||
#demo "down |
#demo "down" |
||
#demo "Font Verdana 20 Bold" |
|||
#demo "When leftButtonUp [changedirection]" |
#demo "When leftButtonUp [changedirection]" |
||
Line 580: | Line 584: | ||
wait |
wait |
||
[draw] |
|||
if direction then |
if direction then |
||
txt$ = right$(txt$, 1);left$(txt$, |
txt$ = right$(txt$, 1);left$(txt$, txtLength - 1) |
||
else |
else |
||
txt$ = right$(txt$, |
txt$ = right$(txt$, txtLength - 1);left$(txt$, 1) |
||
end if |
end if |
||
#demo "discard |
#demo "discard" |
||
#demo "place 50 100" |
|||
#demo "\";txt$ |
|||
wait |
wait |
||
[changedirection] |
|||
direction = not(direction) |
direction = not(direction) |
||
wait |
wait |
||
[quit] |
|||
timer 0 |
timer 0 |
||
close #demo |
close #demo |