Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Getting text to appear over a transparent window

Author
Message
SonicX
20
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 24th Nov 2003 22:54
Please take a look at the code below. It's suppose to display the sentence one letter at a time overlapping a transparent text window which I made as a sprite.
The trouble with the code is that instead of printing "T", "Th", "The" it prints "T", then it deletes "T" and prints "h", then it deletes "h" and prints "e" etc. I've set it to draw sprites first so the text should always overlap the sprite, but it just doesn't work the way I want it to, please help.
Stephen
20
Years of Service
User Offline
Joined: 21st Nov 2003
Location: Appalachians
Posted: 25th Nov 2003 03:54
It worked fine on my computer. Is that all of the code?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Nov 2003 06:27 Edited at: 25th Nov 2003 06:36
works here for me.
You should try this instead.

S$="The cat sat on the mat"
FOR T=1 TO LEN(S$)
TEXT X,Y, left$(S$,T)
WAIT 100
NEXT T


By using left, it'll return the chunk of the string to be displayed instead of just 1 letter at a time. The advantage is when using 3D, or having to clear screen. Because everytime the screen refreshes, the old letters are erased or cleared away. Also, make a delay based on Timer() instead of wait. That way it won't hault the rest of your program.

Login to post a reply

Server time is: 2024-09-21 09:47:15
Your offset time is: 2024-09-21 09:47:15