play video

Post your coding questions such as 'how to' here.
Post Reply
Cool Ice

play video

Post by Cool Ice » Fri Dec 07, 2007 2:37 pm

how do i play a video file? it tried
DrawAnimation explosion.avi, 0, 0
PlayAnimation ("explosion.avi")
DrawScreen

but somehow it doesn't really work.

User avatar
Harakka
Advanced Member
Posts: 430
Joined: Mon Aug 27, 2007 9:08 pm
Location: Salo
Contact:

Re: play video

Post by Harakka » Fri Dec 07, 2007 2:43 pm

Code: Select all

anim = PlayAnimation("explosion.avi")
Repeat
    DrawAnimation anim,0,0
    DrawScreen
Forever
StopAnimation anim
This should work. Remember that the screen resolution must be larger than the resolution of the video (you can change it with SCREEN command).
Peli piirtokomennoilla - voittaja, Virtuaalilemmikkipeli - voittaja,
Sukellusvenepeli - voittaja, Paras tileset - voittaja
Vaihtuva päähenkilö - voittaja, Autopeli - voittaja sekä
Hiirellä ohjattava peli - voittaja B)

Cool Ice

Re: play video

Post by Cool Ice » Fri Dec 07, 2007 5:07 pm

oh, ok - so simple

and how can id set the SCREEN command by using variables?
SCREEN width$, height$, depth$, 0
doesn't work.

And how about resizing images with variables?
ResizeImage Monster, size-w$, size-h$
doesn't work either.

User avatar
Murskaaja
Member
Posts: 92
Joined: Tue Aug 28, 2007 8:19 pm
Contact:

Re: play video

Post by Murskaaja » Fri Dec 07, 2007 5:27 pm

Cool Ice wrote:oh, ok - so simple

and how can id set the SCREEN command by using variables?
SCREEN width$, height$, depth$, 0
doesn't work.

And how about resizing images with variables?
ResizeImage Monster, size-w$, size-h$
doesn't work either.
They don't work because you are using strings ($) while those commands demand integers.
ASCII star wars Xtreme | Cool Bombers | Combat (kehitteillä)

RedShadow productions

User avatar
jannepelaa
Active Member
Posts: 101
Joined: Tue Aug 28, 2007 2:27 pm

Re: play video

Post by jannepelaa » Fri Dec 07, 2007 5:30 pm

Code: Select all

SCREEN Int(width$), Int(height$), Int(depth$), 0

ResizeImage Monster, size-Int(w$), size-Int(h$)
This should work.

Cool Ice

Re: play video

Post by Cool Ice » Sat Dec 08, 2007 5:04 am

cheers, mate!

Post Reply