Code archives/Graphics/TypeRiter Text!

This code has been declared by its author to be Public Domain code.

Download source code

TypeRiter Text! by n8r2k2005
Basically it takes a string, chews it up, assigns variables then does the typewriter effect.

To use, wait for the program to type the string, then press a key.

I am going to post this on http://n8r2k.deviousbytes.com/ soon, maybe
Graphics 800,600,16,2
SeedRnd MilliSecs()

Global fxText$ = "TypeRiter Text Demo By n8r2k " ;Always add one extra space at the end just in case
Global fxlength = Len(fxText$)

Dim fx$(fxlength)
Dim fxx(fxlength)
Dim fxy(fxlength)
Dim f(fxlength)
d = 100
t = 100
For  v = 1 To fxlength
	fxx(v) = d
	f(v) = t
	fxy(v) = 100
	fx$(v) = Left(fxText$,1)
	fxText$ = Right(fxText$,(Len(fxText$)-1))
	d = d + 10
	t = t + 10
Next 
x = 0
For n = 1 To fxlength
	Text f(n),100,fx$(n)
	Delay(50)
	Flip
Next
WaitKey()

Comments

Ked2006
SetBuffer function needs to be in this for it to look smooth.


Ked2006
Wouldn't it be easier if it was this...

Function Rite(a$)
	num=Len(a$)
	For i=1 To num
		Write Mid$(a$,i,1)
		Delay 100
	Next
	Print
End Function

Rite "OH NO!!! I HURT MY FACE!!!!"
Rite "YOU STUPID IDIOT!! YOU HURT MY FACE!!!"

WaitKey()
End



Code Archives Forum