f=openmovie("example.avi") while movieplaying(f) DrawMovie f ;,[x,y][,width,height] wend closemovie(f) flip
and from the help files:
Movie support relies on DirectShow, so you will need to ensure the correct drivers are installed. This command will open GIFs as well as AVI and MPEG movie files