Can I use an AVI file with blitz ??

Blitz3D Forums/Blitz3D Beginners Area/Can I use an AVI file with blitz ??

Simmo(Posted 2005) [#1]
Hi all,
I have just created an AVI file in Lightwave to use as a game intro..Is it possible for me to use this in a Blitz program and how do I call / play it ?

Thanks guys..

Regards Dave


stayne(Posted 2005) [#2]
it took very little effort to find this....

http://blitzbasic.com/b3ddocs/command.php?name=OpenMovie&ref=2d_cat


Simmo(Posted 2005) [#3]
Thanks for that......er...what do i do with it ??????


jfk EO-11110(Posted 2005) [#4]
read it :)

ok, the example is kind of long

graphics 800,600
setbuffer backbuffer()

m=openmovie("mymovie.avi")
while (keydown(1)=0) and (MoviePLaying(m)=1)
 drawmovie m
 flip
wend
closemovie m

You definitively need to learn how to read the manual and docs. Looking at the command reference is always a good idea before you ask here.


tonyg(Posted 2005) [#5]
Graphics 640,480
SetBuffer BackBuffer()
movie=OpenMovie("archer.avi")
While Not KeyHit(1) or movieplaying(movie)=0
	Cls                       
		DrawMovie movie,0,0,MovieWidth(movie),MovieHeight(movie)
	Flip						
Wend
CloseMovie(movie)
End 



jfk EO-11110(Posted 2005) [#6]
tonyg
While Not KeyHit(1) or movieplaying(movie)=0

I guess you meant And movieplaying(movie)=1. the way it is ATM, it will probably give a MAV when it was played one time.


tonyg(Posted 2005) [#7]
Openmovie starts the movieplaying so it's 1 before the
loop.


Simmo(Posted 2005) [#8]
Thanks for all your help guys....

I am using the "OpenMovie()" function but Blitz doesn,t recognise it ?? Ive downloaded the Direct Show stuff but ive obviously done something wrong somewhere along the line ??


tonyg(Posted 2005) [#9]
It was introduced in 1.71.
What level are you using?


Simmo(Posted 2005) [#10]
I downloaded an add-on called BlitzMovie 2....Which by all accounts will do what I need to do...Maybe this is the wrong add-on...Anyone have any ideas ??


Mustang(Posted 2005) [#11]
If OpenMovie() command isn't recoqnized then you must have too old version of Blitz3D. Updates are here:

http://www.blitzbasic.com/Community/posts.php?topic=41400

Also update the docpaks (which are little behind, online manual is most up-to-date):

http://www.blitzbasic.com/Community/posts.php?topic=41401


Simmo(Posted 2005) [#12]
Yes..thats better.....Thanks very much !!!