home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
news
/
442
/
qbxfli10
/
test.bas
< prev
next >
Wrap
BASIC Source File
|
1993-12-16
|
3KB
|
64 lines
'───────────────────────────────────────────────────────────────────────────────
' Simple Test Program For PLAYFLI 1.0
' By Rich Geldreich, Jr. March 1994
'───────────────────────────────────────────────────────────────────────────────
' Note: The XMS.OBJ module hooks onto PDS's "B_OnExit" exit chain.
' If my library crashes for some reason (that shouldn't happen!), all
' allocated XMS handles will be released by this routine. This is true
' in a compiled EXE and in the QBX environment.
'───────────────────────────────────────────────────────────────────────────────
DEFINT A-Z
'───────────────────────────────────────────────────────────────────────────────
CONST TRUE = -1, FALSE = 0
'───────────────────────────────────────────────────────────────────────────────
'$INCLUDE: 'PLAYFLI.BI'
'$INCLUDE: 'FLIASM.BI'
'───────────────────────────────────────────────────────────────────────────────
' You can also call BIOS to set the mode if you don't want to pull
' in QBX's graphic library, because my routines do all of their own
' dirty work.
SCREEN 13
Path$ = "C:\FLI\" 'modify this, of course!
a$ = DIR$(Path$ + "*.FLI")
DO WHILE LEN(a$)
'Make sure you ALWAYS pass either TRUE (-1) or FALSE (0) to PlayFLI
'for parameters which require a true or false setting. Any other value
'may cause PlayFLI to act very strangely!!
filename$ = Path$ + a$ 'filename of FLI file to play
NumLoops% = 4 'number of loops to play, 0 = once, 1 = twice, etc.
Speed% = 0 'playback speed, 0 = normal, 1 - 400 = fast...slow
ShowDelay% = 24 'delay in 1/18.2's of a second before animation
ShownDelay% = 24 'delay in 1/18.2's of a second after animation
FadeInSpeed% = 4 'fade in speed, 0 = no fade, 1-256 = slow...fast
FadeOutSpeed% = 4 'fade out speed, 0 = no fade, 1-256 = slow...fast
AbortCheck% = TRUE 'if TRUE, check keyboard & mouse for user abort
UseXMS% = TRUE 'if TRUE, use XMS memory to cache FLI if possible
i% = PlayFLI%(filename$, NumLoops%, Speed%, ShowDelay%, ShownDelay%, FadeInSpeed%, FadeOutSpeed%, AbortCheck%, UseXMS%)
' The -4 ABORTED error code will be returned if the user hits the
' right mouse button or presses escape. ...see PLAYFLI.BI for more
' error codes.
IF i% THEN
IF i% <> ABORTED THEN
SCREEN 0
WIDTH 80, 25
PRINT "Error "; i%; "on file "; filename$
a$ = INPUT$(1)
END IF
END
END IF
a$ = DIR$
LOOP