Movie [SOLVED]

Started by Mozesh, Fri 11/03/2005 14:05:08

Previous topic - Next topic

Mozesh

Hey I need to know how to play a movie in a ags game I'm making, if possible. You know like a mpg, avi or wmv movie or something
-Redrum89

Rui 'Trovatore' Pires

The answer lies in the manual.

QuotePlayVideo
PlayVideo (string filename, int skip, int flags)

Plays an AVI or MPG file, or any other file type supported by Media Player.
FLAGS can be one of the following:

0: the video will be played at original size, with AVI audio
1: the video will be stretched to full screen, with appropriate
   black borders to maintain its aspect ratio and AVI audio.
10: original size, with game audio continuing (AVI audio muted)
11: stretched to full screen, with game audio continuing (AVI audio muted)

SKIP defines how the player can skip the video:
0  player can't skip video
1  player can press ESC to skip video
2  player can press any key to skip video
3  player can press any key or click mouse to skip

The game is paused while the animation plays.
IMPORTANT: Any video files you have for this cannot be compiled into the main game data file, so you will have to place them seperately in the Compiled folder for them to work.

IMPORTANT: The end player will have to have the correct codecs installed in order to play the video. Bear in mind that if you encode your intro with DivX, for instance, the player will need to have that codec installed in order to view the video.

NOTE: Since the video must play at your game's colour depth, you may notice that in a 256-colour game it is very difficult to get a video that looks good, due to the attempt to reduce the depth of the video on the fly. FLIC may be a better choice for 256-colour games.

Cross-Platform Support

Windows: Yes
MS-DOS: No
Linux: No

Example:

PlayVideo ("intro.mpg", 1, 1);

will play the video Intro.mpg, allowing the player to skip with ESC if they've seen it before.
See Also: PlayFlic

At any rate, I'm very sure this should be in the begginer's forum.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk