BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"Horizontal Text Scroller"
, by specis
Loads the Text in from a text file and scrolls it across the bottom of the screen. Eh no limit on Length or number of lines in the Txt file. that i know of. prove me wrong though :D
Code
resX = 800 resY = 600 Dept = 16 Graphics resX,resY,Dept SetBuffer BackBuffer() ; Load in the First Line add it the the main string and continue on till all is done ScrollerText$ = "" ; Makes sure there is no text in the string startingCords = resX + 50 file = OpenFile("cha.txt") ; opens the file (PUT YOUR OWN TXT FILE IN HERE!!!!!!!!) Repeat Scrollertext = Scrollertext + " " + ReadLine(file) ; add the next line onto the end of the last line Until Eof(file) Color 247,201,89 ; sets the colour to the funkey yellow size = StringWidth(Scrollertext) FinishingCords = (0 - (size + 50)) scrollpic = CreateImage(size,15,1) SetBuffer ImageBuffer(scrollpic) Cls Text 0,0,Scrollertext SetBuffer BackBuffer() While Not KeyHit(1) Cls DrawImage scrollpic,StartingCords,(resy - 30) Flip startingCords = StartingCords - 1 If StartingCords < FinishingCords StartingCords = (ResX + 50) EndIf Wend End
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations