movie embedded in a Tk window, using Xanim FROM: http://wiki.tcl.tk/864 (imaged on 2009 mar 19) XAnim [xanim.polter.net] has the capability to embed into a Tk window with relative ease, and it supports most common video formats. This example will make XAnim draw into the Tk frame: ---------------------- #!/usr/local/bin/wish8.2 frame .movieholder -height 300 -width 300 .movieholder configure -bg black place .movieholder -x 270 -y 120 #It is very important that update is used here. It creates the window for us. #IIRC in recent versions of Tk winfo id should call Tk_MakeWindowExist. update set frameid [winfo id .movieholder] catch [exec xanim +Ze -Zr +Av75 +W$frameid movie.mov] #This is run after the movie. #In my game I load a new scene and image. destroy .movieholder ------------------- END OF CODE SAMPLE. Note: The +Ze flag tells XAnim to exit after the movie finishes. The -Zr flag tells XAnim to not have a control interface. The +Av75 flag tells XAnim to play audio in the movie at 75% of the maximum level. The +W flag instructs XAnim to draw into the hexadecimal id of a window. You can try adding [puts $frameid] to see the id of a frame and learn about X. 2005-01-09 note: You can also control the movie. Start and Stop can be done with the kill command (Linux). This way was in the newsgroup comp.lang.tcl. I was not able to control the embedded window in which xanim is running as told in xanim's man-page. But this now works. #!/usr/bin/wish -f frame .movieholder -height 300 -width 500 .movieholder configure -bg black pack .movieholder update set frameid [winfo id .movieholder] # starting the movie catch { set xanim_pid [exec xanim +Ze -Zr +W$frameid mymovie.avi & ]} # stop and start the movie after 100 puts stop catch {exec kill -STOP $xanim_pid} after 2000 puts start catch {exec kill -CONT $xanim_pid}