# movie15.sty \includemovie beamer: show the movie at the same time as an item in an item list

Please someone help. I spent 2 days on this problem: I am trying to show the movie at the same time as an item in an item list. How can I show the movie with the first item?

If I had an image instead of a movie I would write it like this:

\includegraphics<1>[width=\textwidth]{img1.jpg}


But for a movie it is not working. It shows the movie after all the items in the list are shown.

\includemovie<1>[poster]{3.25cm}{3.25cm}{movie1.jpg}


This doesn't work neither:

\visible<2->{\includemovie[poster]{3.25cm}{3.25cm}{movie1.jpg}}


Full working code snipet (if you have the images in your working directory):

\begin{frame}
\frametitle{Overlay Specification}
\begin{columns}
\begin{column}{5cm}
\begin{itemize}
\item<1-> Figure 1
\item<2-> Figure 2
\item<3-> Figure 3
\end{itemize}
\vspace{3cm}
\end{column}
\begin{column}{5cm}
\includegraphics<1>[width=\textwidth]{img1.jpg}
\includegraphics<2>[width=\textwidth]{img2.jpg}
\includegraphics<3>[width=\textwidth]{img3.jpg}
\end{column}
\end{columns}
\end{frame}


But now I replace the first figure with a movie and it is not working anymore?

\begin{frame}
\frametitle{Overlay Specification}
\begin{columns}
\begin{column}{5cm}
\begin{itemize}
\item<1-> Figure 1
\item<2-> Figure 2
\item<3-> Figure 3
\end{itemize}
\vspace{3cm}
\end{column}
\begin{column}{5cm}
\leavevmode
\visible<2->{\includemovie[poster]{3.25cm}{3.25cm}{images/predoc_oral/bullet_lg.mpg}}
\includegraphics<2>[width=\textwidth]{img2.jpg}
\includegraphics<3>[width=\textwidth]{img3.jpg}
\end{column}
\end{columns}
\end{frame}


(I posted the same question here but the webpage couldn't print the chevrons character, making my question not understandable.)

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). I also removed the Markdown title formatting in order to make the question more readable, hope it's ok. :) –  Paulo Cereda Jan 2 '12 at 9:50
You replaced \includegraphics<1>{...} by \visible<2->{\includemovie...}. Shouldn't it be rather replaced by \visible<1>{\includemovie...} –  AlexG Jan 2 '12 at 10:41
Thanks @PauloCereda! Looks much better like this... Yes my bad @Alexander, I made a mistake when I copy-pasted... I meant: \visible<1>{\includemovie...} But event this doesn't work ... Any ideas? Oh... and this should be included in order for the file to work: \documentclass[10pt]{beamer} \usepackage{graphicx} \usepackage{movie15} \begin{document} ... MORE CODE (from above...) \end{document} BTW I can't figure out how to put linebreaks in this comment... sorry about that... –  mhatthei Jan 3 '12 at 6:30
It is not a good idea to place images into figure environments in a presentation. This creates floating objects whose final placement is hard to predict. –  AlexG Jan 3 '12 at 7:44

A community wiki answer, originally edited by the OP into his question: here's a working piece of code to show how to get it done. Not the way originally wanted, but at least the video is displayed on the slide as desired.

The first slide is the fail, and the second slide is the good one. There may be a more elegant solution to this, so feel free to comment or to add another answer.

\documentclass[10pt]{beamer}
\usepackage{graphicx}
\usepackage{movie15}
\def\hilite<#1>{\temporal<#1>{\color{gray}}{\color{blue}}{\color{blue!25}}}
\begin{document}
\begin{frame}
\begin{columns}
\column{.5\textwidth} \hspace{0.001cm}
\begin{itemize}
\hilite<2> \item Line 1
\hilite<3> \item Line 2
\hilite<4> \item Line 3
\end{itemize}

\column{.5\textwidth} \hspace{-20pt}
\begin{figure}[hpt!]
\visible<2->{
\includemovie[poster,autoplay]{3.25cm}{3.25cm}{images/predoc_oral/bullet_lg.mpg}}
\end{figure}

\begin{figure}[hpb!]
\includegraphics<3->[width=\textwidth]{images/predoc/WMAP_pie.png}
\end{figure}
\end{columns}
\end{frame}

\begin{frame}
\begin{columns}
\column{.5\textwidth} \hspace{0.001cm}
\begin{itemize}
\hilite<2> \item Line 1
\end{itemize}

\column{.5\textwidth}
\vspace{-20pt}
\begin{figure}[hpt!]
\visible<2->{\includemovie[poster,autoplay]{3.25cm}{3.25cm}{%
images/predoc_oral/bullet_lg.mpg}}
\end{figure}
\end{columns}

\begin{columns}
\column{.5\textwidth} \hspace{0.001cm}
\begin{itemize}
\hilite<3> \item Line 2
\hilite<4> \item Line 3
\end{itemize}

\column{.5\textwidth}
\vspace{20pt}
\begin{figure}[hpb!]
\visible<3->{\includegraphics[width=\textwidth]{images/predoc/WMAP_pie.png}}
\end{figure}
\end{columns}
\end{frame}

\end{document}

-