Scroll by Brux5th Oct 2011 8:19
|
---|
Summary Nice scroll text effect Description Nice scroll text effect Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com rem ********************* rem * Scrolling-Text * rem ********************* Dim char(16) sync on Load bitmap "Picture.jpg",0 Rem captures characters gosub capture restore letters Rem Need for this delay wait 1000 do Rem Reset values px1=0:px2=0:px3=0:px4=0:px5=0:px6=0:px7=0:px8=0 px9=0:px10=0:px11=0:px12=0:px13=0:px14=0:px15=0 read stringa$ read tmp,fx Rem If fx=-1 then end routine if fx=-1 then go=1 Rem Finds Asc value for i=1 to 15 char(i)=asc(mid$(stringa$,i))-64 next i Rem Start effect gosub etvoila if go=1 then exit sync loop Rem waits for mouse button press while mouseclick()=0 : sync :endwhile Rem End routine gosub dxsx cls end rem routine effect etvoila: repeat sprite 1,700-px1,220,char(1) inc px1,16 sprite 2,700-px2,220,char(2) inc px2,15 sprite 3,700-px3,220,char(3) inc px3,14 sprite 4,700-px4,220,char(4) inc px4,13 sprite 5,700-px5,220,char(5) inc px5,12 sprite 6,700-px6,220,char(6) inc px6,11 sprite 7,700-px7,220,char(7) inc px7,10 sprite 8,700-px8,220,char(8) inc px8,9 sprite 9,700-px9,220,char(9) inc px9,8 sprite 10,700-px10,220,char(10) inc px10,7 sprite 11,700-px11,220,char(11) inc px11,6 sprite 12,700-px12,220,char(12) inc px12,5 sprite 13,700-px13,220,char(13) inc px13,4 sprite 14,700-px14,220,char(14) inc px14,3 sprite 15,700-px15,220,char(15) inc px15,2 sync until px1>tmp wait 1000 if go=1 then return dxsx: REM scroll text ends repeat sprite 1,700-px1,220,char(1) inc px1,4 sprite 2,700-px2,220,char(2) inc px2,5 sprite 3,700-px3,220,char(3) inc px3,6 sprite 4,700-px4,220,char(4) inc px4,7 sprite 5,700-px5,220,char(5) inc px5,8 sprite 6,700-px6,220,char(6) inc px6,9 sprite 7,700-px7,220,char(7) inc px7,10 sprite 8,700-px8,220,char(8) inc px8,11 sprite 9,700-px9,220,char(9) inc px9,12 sprite 10,700-px10,220,char(10) inc px10,13 sprite 11,700-px11,220,char(11) inc px11,14 sprite 12,700-px12,220,char(12) inc px12,15 sprite 13,700-px13,220,char(13) inc px13,16 sprite 14,700-px14,220,char(14) inc px14,17 sprite 15,700-px15,220,char(15) inc px15,18 sync until px1>1100 wait 500 Return capture: size=48 create bitmap 1,100,100 set text font "Arial Black" set text size 48 rem Capture images color=yellow ink rgb(205,178,0),0 for i=1 to 26 text 1,1,chr$(i+64) get image i,0,0,99,99 cls next i delete bitmap 1 set current bitmap 0 return Rem some phrases letters: DATA " APOLOGIZE ME ",750,0 DATA " FOR MY ENGLISH",750,0 DATA " THANKS TO ",750,0 DATA " LEE BAMBER ",750,0 DATA " FOR MAKING ",750,0 DATA " DARK BASIC ",750,0 DATA " EXAMPLE OF ",750,0 DATA " SCROLLING TEXT",750,0 DATA " WRITE ANYTHING",750,0 DATA " THAT YOU WANT ",750,0 DATA " MMMMMMMMMMMMM ",750,0 DATA " BLA BLA BLA ",750,0 DATA " BY MANZONI ",750,0 DATA " ITALY ",750,0 DATA " CLICK MOUSE ",750,-1 |