FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

DRAWING

Scroll credits


this was written for the editor (and is done in FBII) but you can easily see how I start with a STR# resource and scroll the credits.
'-----------------------------
'animateAbout
'-----------------------------
LOCAL
DIM tks&
DIM t,l,b,r
DIM srcT,srcL,srcB,srcR
DIM bWorld&
DIM rHndl&
DIM count,x,worldBot,fht,t$
DIM oldPort&,oldDev&
LOCAL FN animateAbout(dlogPtr&)
   CALL GETPORT(oldPort&)

   '
   ' Show version
   '
   rHndl& = FN get1Res(_"vers",1,-1)
   LONG IF rHndl&
     CALL SETPORT(dlogPtr&)
     t$ = PSTR$([rHndl&]+6)
     CALL MOVETO(288,88)
     TEXT _geneva,9,0,1
     CALL FORECOLOR(_whiteColor)
     CALL BACKCOLOR(_blackColor)
     CALL DRAWSTRING(t$)
   END IF

   tks& = FN TICKCOUNT + 120
   rHndl& = FN GETRESOURCE(_"STR#",_creditsID)
   LONG IF rHndl&
     count = rHndl&..nil%
   XELSE
     count = 0
   END IF
   LONG IF count
     TEXT _geneva,9,0,0
     fht = USR FONTHEIGHT
     t = 132
     l = 8
     b = t + (count+16) * fht
     r = 198

     bWorld& = FN buildBWorld(t)
     LONG IF bWorld&
       CALL SETPORT(bWorld&)
       TEXT _geneva,9,0,0
       CALL BACKCOLOR(_blackcolor)
       CALL FORECOLOR(_whiteColor)
       CALL ERASERECT(gBigT)

       FOR x = 1 TO count
         t$ = STR#(_creditsID,x)
         LONG IF LEN(t$)
           CALL MOVETO(28,(x+4)*fht)
           LONG IF LEFT$(t$,1) <> " "
             CALL TEXTFACE(1)
           XELSE
             CALL TEXTFACE(0)
           END IF
           CALL DRAWSTRING(t$)
         END IF
       NEXT

       worldBot = b - t
       b = dlogPtr&.portRect.bottom%
       worldBot =worldBot - (b-t)

       CALL FORECOLOR(_blackColor)
       CALL BACKCOLOR(_whiteColor)
       CALL SETPORT(oldPort&)
       CALL FORECOLOR(_blackColor)
       CALL BACKCOLOR(_whiteColor)

       "Keep Animating"
       srcT;8 = @t
       CALL OFFSETRECT(srcT,-srcL,-srcT)

       WHILE FN BUTTON = _false AND FN TICKCOUNT < tks&
       WEND

       FOR x = 0 TO worldBot
         CALL COPYBITS(#bWorld& + 2,#dlogPtr& + 2,srcT,t,_srcCopy,0)
         CALL OFFSETRECT(srcT,0,1)
         LONG IF FN BUTTON
           x = worldBot
           FLUSHEVENTS
         XELSE
           DELAY 50
         END IF
       NEXT

       IF FN BUTTON = _false THEN "Keep Animating"

       FN disposeBWorld(bWorld&)
     END IF

   END IF

END FN
STAZ

OK, here is the update that should be good for ya all. FutureBASIC II and ^3 sources are included and identical. Everything appears to be working now.

Also there is an added bonus, the window moves to the size of the background picture and the scrolling credits if smaller will zoom to the center of the window for ya, so you can have a nice and large graphic or something.

ftp.foxchange.com/ScrollingCredits.hqx