damn sorry, i was looking at tiger's code.
i use this code:
Set Window On
Set Window Title "AVI TEST"
Disable Escapekey
CreateAviFile("AVI TEST","example.avi",30,"output.bmp",1,0)
BOX 0,0,SCREEN WIDTH(),sCREEN hEIGHT(),RGB(255,0,0),RGB(0,255,0),RGB(255,255,0),RGB(255,0,255)
While escapekey()=0
INK RGB(RND(255),RND(255),RND(255)),0
BOX RND(SCREEN WIDTH()),RND(SCREEN HEIGHT()),RND(SCREEN WIDTH()),RND(SCREEN hEIGHT())
Get Image 1,0,0,Screen Width(),Screen Height()
Save Image "output.bmp",1
WriteImageToAviFile()
Endwhile
CloseAviFile()
Function CreateAviFile(baviApplicationTitle$,baviNameOfAviFile$,baviFrameTime,baviImageName$,baviCompressionFlag,baviSuppressOverwrite)
baviBankSize = 250
rem baviBankDataIn = CreateBank(baviBankSize)
rem baviBankDataOut = CreateBank(baviBankSize)
make memblock 250,250
make memblock 251,250
For tcount = 0 To baviBankSize-1
rem PokeByte baviBankDataIn, tcount, 0
rem PokeByte baviBankDataOut, tcount, 0
write memblock byte 250,tcount,0
write memblock byte 250,tcount,0
Next tcount
If Len(baviNameOfAviFile$) > 80 Then exit prompt "ERROR !","Name Of Avi File is too long, must be 80 characters or less!" :end
For tcount = 0 To Len(baviNameOfAviFile$)-1
rem PokeByte baviBankDataIn, tcount, Asc(Mid$(baviNameOfAviFile$, tcount+1, 1))
write memblock byte 250,tcount,Asc(Mid$(baviNameOfAviFile$, tcount+1))
Next tcount
write memblock dword 250,80,baviFrameTime
If Len(baviImageName$)>79 Then end
For tcount = 0 To Len(baviImageName$)-1
rem PokeByte baviBankDataIn, tcount+84, Asc(Mid$(baviImageName$, tcount+1, 1))
write memblock byte 250,tcount+84,Asc(Mid$(baviImageName$, tcount+1))
Next tcount
If Len(baviApplicationTitle$) > 75 Then end
For tcount = 0 To Len(baviApplicationTitle$)-1
rem PokeByte baviBankDataIn, tcount+164, Asc(Mid$(baviApplicationTitle$, tcount+1, 1))
write memblock byte 250,tcount+164, Asc(Mid$(baviApplicationTitle$, tcount+1))
Next tcount
If baviCompressionFlag = 0
rem PokeByte baviBankDataIn, 240, False
write memblock byte 250,240,0
Else
rem PokeByte baviBankDataIn, 240, True
write memblock byte 250,240,1
EndIf
If baviSuppressOverwrite = 0
rem PokeByte baviBankDataIn, 241, False
write memblock byte 250,241,0
Else
rem PokeByte baviBankDataIn, 241, True
write memblock byte 250,241,1
EndIf
load dll "BlitzAvi.dll",98
show mouse
Call DLL 98,"create_avi_file",GET MEMBLOCK PTR(250),GET MEMBLOCK PTR(251)
hide mouse
endfunction result
Function WriteImageToAviFile()
if dm=0 then show mouse
Call DLL 98,"write_image_to_avi_file"
if dm=0 then hide mouse
dm=1
EndFunction result
Function CloseAviFile()
rem FreeBank baviBankDataIn
rem FreeBank baviBankDataOut
delete memblock 250
delete memblock 251
call dll 98,"close_avi_file"
delete dll 98
EndFunction result
with the blitzavi.dll in the same directory and it works quite well.