Play Media

Posted By: tphsports

Play Media - 06/26/06 06:21

i'm a new man of 3DGS, i'd like to play a video before load level. i tryed very many times......but nothing........Can you all show me the way to do?i would very very thank forthat........help me, please........
Posted By: Anonymous

Re: Play Media - 06/26/06 14:10

Hi!

Use media_play(string,bmap,volume).
Read the manual for using it.

Example:
Code:

function main{
var lv_hdl;

video_switch(8,32,1); // set videomode
lv_hdl = media_play("movie.avi",null,100); // play movie in fullscreen

while(media_playing(lv_hdl)==on && key_pressed(1)==off){wait(1);} // wait or break

media_stop(lv_hdl);

level_load(...);

...
}



~ not tested! ~

mercuryus
Posted By: tphsports

Re: Play Media - 06/28/06 05:55

Thank mer but i did follow this way, nothing happened.........bad........i use cscript in template and copy this script in end-script. so what wrong? (i showed path to avi),can you show me more?or share me some example for that? thank much...mer
Posted By: Wiz

Re: Play Media - 06/28/06 16:20

Code:
 

var lv_hdl; video_switch(8,32,1); // set videomode
lv_hdl = media_play("movie.avi",null,100); // play movie in fullscreen
while(media_playing(lv_hdl)==on && key_pressed(1)==off){wait(1);} // wait or break
media_stop(lv_hdl);


You should drop this part of mercuryus' script into your main function, he has chosen to put it before the level_load(); function in his script. I haven't tested it either, but it should play the movie.avi file.
Posted By: tphsports

Re: Play Media - 06/29/06 06:32

oh i'll try again! thank Wiz
© 2024 lite-C Forums