Creating a scrolling marquee

Blitz3D Forums/Blitz3D Programming/Creating a scrolling marquee

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Pehaps this will work for you...

Graphics3D 640,480
SetBuffer BackBuffer()

scr_scroll=CreateImage(650,15)

tx$=tx$+"THIS IS A TEST..........................."
tx$=tx$+"And so on...................."

tx_pos=1
go=8

Repeat
Cls

go=go+2

If go>8 Then Gosub char
Gosub scroll

DrawImage scr_scroll,0,120

Flip
Until KeyHit(1)
End

.scroll
SetBuffer ImageBuffer(scr_scroll)
DrawBlock scr_scroll,-2,0
SetBuffer BackBuffer()
Return

.char
SetBuffer ImageBuffer(scr_scroll)
go=0
tmp$=Mid$(tx$,tx_pos,1)
Text 640,2,tmp$
tx_pos=tx_pos+1 : If tx_pos > Len(tx$) Then tx_pos=1
SetBuffer BackBuffer()
Return

at leats it works....

Sveinung