'=========================================================================== ' Subject: TEXT SCROLLER V2.0 Date: 01-20-97 (16:40) ' Author: Nick Kochakian Code: QB, QBasic, PDS ' Origin: NickK@worldnet.att.net Packet: TEXT.ABC '=========================================================================== DECLARE SUB TEXTSCRL (TEXT$, WAY%, DELY%, X%, Y%, CHARS%) '---------------------------------------------------------------------------- 'Program name: Text scroll 'Verison: verison 2.0 ' 'Date made: 1/20/97, 1997 ' 'Author: - Nick Kochakian - ' 'Changes: '- Some scrolling text dosen't have an 78 character maximum. ' The unlimited text also never stops unless you press a key ' 'This program will scroll a text string up to 78 characters MAXIMUM! 'If you have any questions or comments on this program or any others 'please E-mail me at: ' 'nickK@worldnet.att.net ' 'You can use this program in your program but PLEASE give me credit where 'it is deserved the most! 'Thanks! :) '---------------------------------------------------------------------------- CLS TEXT$ = "Text scroller verison 2.0 by: - Nick Kochakian - 1997 " 'Leave 2 spaces at the end if you are using scrolling off the screen to the 'left 'To add color to the scrolling text just use the regular COLOR command 'BEFORE you call TEXTSCRL CALL TEXTSCRL(TEXT$, 1, 9999, 1, 1, 0) SLEEP 1 CALL TEXTSCRL(TEXT$, 3, 9999, 1, 1, 0) SLEEP 1 CALL TEXTSCRL(TEXT$, 2, 9999, 1, 1, 0) SLEEP 1 TEXT$ = "Text scroller verison 2.0 by: - Nick Kochakian - 1997 If you have any comments or questions please e-mail me at: nickK@worldnet.att.net Thanks! :) " CALL TEXTSCRL(TEXT$, 4, 9999, 1, 1, 80) 'TEXT$ - Is the text string 'WAY% - Is the way to scroll it: ' 1 = Typing effect (left to right) ' 2 = Scrolls the text on from the left side of the screen ' 3 = Scrolls the text off the screen. (Moves it to the left) ' 4 = The everlasting scroll. Only ends when you press a key. 'DELY% - Is the delay I use 9999 as the delay for my Pentium 60. ' If the delay dosen't slow it down enough then add your own or ' copy / paste the original delay 1 or 2 times! 'X% - Is the X position of the text on the screen 'Y% - Is the Y position of the text on the screen ' ' 'CHARS% - Is the number of characters to display at one time when using ' WAY 4. Otherwise, set to zero or whatever. SUB TEXTSCRL (TEXT$, WAY%, DELY%, X%, Y%, CHARS%) IF WAY% = 1 THEN MAXCHR = LEN(TEXT$) FOR I = 1 TO MAXCHR LOCATE X%, Y%: PRINT LEFT$(TEXT$, I) FOR A = 1 TO DELY% NEXT A NEXT I END IF IF WAY% = 2 THEN MAXCHR = LEN(TEXT$) FOR I = 1 TO MAXCHR LOCATE X%, Y%: PRINT RIGHT$(TEXT$, I) FOR A = 1 TO DELY% NEXT A NEXT I END IF IF WAY% = 3 THEN MAXCHR = LEN(TEXT$) FOR I = 1 TO MAXCHR LOCATE X%, Y%: PRINT MID$(TEXT$, I) FOR A = 1 TO DELY% NEXT A NEXT I END IF IF WAY% = 4 THEN I = 1 MAXCHR = LEN(TEXT$) DO LOCATE X%, Y%: PRINT MID$(TEXT$ + TEXT$, I, CHARS%) I = I + 1 IF I > MAXCHR THEN I = 1 FOR A = 1 TO DELY% NEXT A LOOP UNTIL INKEY$ <> "" END IF END SUB