XeTeX + movie15_dvipdfmx : can it import SWF ?

I am using the movie15_dvipdfmx package to embed movies to my textbook when it is compiled with XeLaTeX or the movie15 package when it is compiled with PDFLaTeX.

Here is my code for the PDFLaTeX compiler:

\usepackage{movie15}
...
\includemovie[
label=movie-04-09
,mouse=true
,text={\includegraphics[width=\textwidth]{2011-04-09}}
]{}{}{Video/2011-04-09.swf}
...
\movieref[pause]{movie-04-09}{ Video }


It makes poster from 2011-04-09.pdf and imports flash movie 2011-04-09.swf. Everything works as expected, in particular the last command in the above code produces bottom Video which starts or pause playback of the movie.

Same code for XeLaTeX looks a bit different:

\usepackage[dvipdfmx]{movie15_dvipdfmx}
...
\includemovie[
label=movie-04-09
,mouse=true
,text={\includegraphics[width=\textwidth]{2011-04-09}}
]{}{}{Video/2011-04-09.swf}
...
\movieref[pause]{movie-04-09}{ Video }


The bottom does not operate, and click on the poster yields the message

Warning: Javascript window: Expected a stream object

If I substitute 2011-04-09.swf with AVI movie, click on the poster launch the movie but the button still does not operate.

Actually I am satisfied with version of my textbook produced by PDFLaTeX but I would like to invoke XeLaTeX in order to experiment with different fonts. I suspect that XeTeX + movie15_dvipdfmx currently are not able to import flash movies but my experience is limited by only two SWF movies. Origin of my troubles may reside in my SWF files.

Can somebody share here his experience on importing SWF movies into PDFdocuments, especially produced by xelatex.

My answer is my choice. I have moved to LuaLaTeX. It imports SWF painlessly in contrast to XeLaTeX. Although LuaTeX is still beta version, and I found couple of bugs, finally I managed to compile my presentation.

Here is my code:

\documentclass[
,hyperref={
,filecolor=purple
,citecolor=teal
}
,xcolor={svgnames,usenames}
]{beamer}

\usepackage{movie15}
\usepackage{graphicx}
\graphicspath{{}{Graph/}{../Graph/}{../Graph/seminar/}}

\DeclareRobustCommand*{\RunVideo}{\raisebox{-0.25\height}{\includegraphics[width=1.5em]{icon_video.png}}}

\usepackage{ifluatex}
\ifluatex
\usepackage[english,russian]{babel}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Cambria}
\setsansfont[Ligatures=TeX]{Calibri}
\usepackage[math-style=TeX]{unicode-math}
\setmathfont{Cambria Math}
\else
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{cmap}
\fi

\begin{document}
\begin{frame}
\frametitle{Замкнутые траектории}
\centering

\includemovie[
label=movie-1
,mouse=true
,text={\includegraphics[width=\textwidth]{plts.pdf}}
]{}{}{Graph/plts.swf}%

\medskip\raggedright
Фотоны, инжектированные под углом $\theta_\text{in}=\alpha l$,
$l=1,2,3\dots$ двигаются по замкнутой траектории и живут в ловушке «вечно».

\medskip\footnotesize
\movieref[pause]{movie-1}{\RunVideo}
$\alpha=8^\circ$, $l=3$, $\delta=0$.

\end{frame}
\end{document}


I showed quite big chunck of code here because there remains subtle problem with frame around an icon printed by the \RunVideo command. I managed to remove it by setting color options for the hyperlink package, which is required by the movie15 package.

• Could you share the code? – Emre Jun 11 '11 at 18:22