i just typed your code and test it - it's working well, plays fullscreen video before actual level loading (as desired, your code isn't complicated.).
Code:
function main()
{
media_play("clock.avi",null,100);
while(media_playing(media_handle)) {
if(key_space) {
media_stop(media_handle);
}
wait(1);
}
...
It's strange that your video plays in the cutscene template.
Make a simple empty project and try just to display the video (without all your rest code). I mean, you have to debug a little. Hope, your 3dgs isn't A6.22pro
if so, update to the a6.314 at least.
I had troubles once, when my friend made small video from 3dmax with unusual codec (can't remember, somethink like SinePack...).
with any other codec i haven't any problem.
By the way, do you know about license fee if you're using DivX, mp3, etc.?