Learn to Program with ZedLX

Free Online Programming Course for Beginners

Simple Motion [10/10]

This demonstrational program draws a moving text on the screen.

The program uses named arguments to set the color and the coordinates of the displayed text. Named arguments of println statements are explained in the next chapter.

Exercise:

The animated text leaves a trail. Can you remove the trail?


Solution

for #i=300..0 -=5
	{
	clearScr(); << insert this line only
	... (the rest of code)
	

Another possibility is to use a call to fillScr(/black) procedure.

Loading...