setscreen ("graphics:800;155,nobuttonbar") % Get rid of the button bar and set a reasonable workspace for the stickman to move
var fr1, fr2 : int
% Frame 1
Draw.Line (10, 1, 25, 50, 255) % Left Leg
Draw.Line (40, 1, 25, 50, 255) % Right Leg
Draw.Line (25, 50, 25, 100, 255) % Torso
Draw.Line (10, 75, 40, 100, 255) % Arms
Draw.FillOval (25, 125, 25, 25, 255) % Head
fr1 := Pic.New (0, 0, 125, 150) % Capture picture for use later
Draw.Cls % Clear and start drawing next
% Frame 2
Draw.Line (25, 1, 25, 50, 255) % Left Leg
Draw.Line (25, 1, 25, 50, 255) % Right Leg
Draw.Line (25, 50, 25, 100, 255) % Torso
Draw.Line (10, 100, 40, 75, 255) % Arms
Draw.FillOval (25, 125, 25, 25, 255) % Head
fr2 := Pic.New (0, 0, 125, 150) % Capture picture for use later
Draw.Cls % Clear and make way for animation
% Animate the frames to make the stick man move across the screen
loop
for i : 0 .. 750 by 25
Pic.Draw (fr1, i, 0, picCopy)
Time.Delay (100)
Pic.Draw (fr2, i, 0, picCopy)
Time.Delay (100)
Draw.Cls
end for
% Animate the frames to make the stick man move back to where he started
for decreasing i : 750 .. 0 by 25
Pic.Draw (fr1, i, 0, picCopy)
Time.Delay (100)
Pic.Draw (fr2, i, 0, picCopy)
Time.Delay (100)
Draw.Cls
end for
end loop
|