There are a couple ways. The easiest way is to use
DRAW TO BACK. Call this somewhere before you display any 2d on the screen (don't keep repeating it in a loop though). This will put all 2d (except sprites) behind all 3d. When you want the 2d back in front use DRAW TO FRONT.
You can also play an animation on another bitmap. Bitmap, in this case, means an offscreen or hidden drawing area that has the same properties as the main drawing area except you can control it's size. You create an offscreen bitmap with
CREATE BITMAP number,width,height. But once you create a bitmap, all drawing is done there so any 2d will not show up on bitmap 0 (the main drawing screen) until you switch the screens with SET CURRENT BITMAP bitmap number or use COPY BITMAP from,to, or get the image from the hidden bitmap.
Once the animation is playing on another bitmap, you can use GET IMAGE to capture each frame and texture them onto another 3d object - like a plain. You then could position the plain anywhere you want in your 3d world. The pseudo code looks like this
load animation "animation name.avi",aninumber
anht=ANIMATION HEIGHT(aninumber)
anwd=ANIMATION WIDTH(aninumber)
anx=ANIMATION POSITION X(aninumber)
any=ANIMATION POSITION y(aninumber)
create bitmap 1 through 32,anwd+1,anht+1
LOOP ANIMATION aninumber, Bitmap Number, anx,any,anx+anwd,any+anht
main loop
rem the bitmap is still set to 1 so we can get images of the animation
rem from there
get image 1,anx,any,anx+anwd,any,anht
texture object a plain,1
Enjoy your day.