The VideoTex sample shows how to use an .avi file as a texture map.
Source: (SDK root)\Samples\Multimedia\D3dim\Src\VideoTex
Executable: (SDK root)\Samples\Multimedia\D3dim\Bin
Press F1 to see a list of the usual commands.
The program draws a cube with an .avi texture mapped to each of its faces. The key is to have the texture's surface use the DDSCAPS2_HINTDYNAMIC flag.