First of all, don't use movie15 anymore. Package media9 is meant to replace it.
We can make use of a PDF feature called Sub-Page Navigation to bind GoTo3DView actions to the left <-- and right --> keyboard keypress events. Only after executing the complete sequence of actions, the Reader proceeds to the next/previous document page.
Note that this feature requires the Full-Screen mode.
The code below defines the command \ThreeDPresSteps which takes a comma separated list of {<3D label>,<number of views>} pairs as its argument. (Braces around pairs are mandatory, even for a single one.)
\ThreeDPresSteps{...} is to be used before the code of a beamer frame containing 3D objects. The views of the 3D objects referenced by the command are went through in the order given by the views files and in the order of <3D label>s in the command argument.
Remember that only the left and right arrow keys allow you to navigate in both directions between the presentation steps within a page. The other arrow and PgUp/PgDn keys only go in the forward direction (AR-9 for Linux).
...
% initialise 3D presentation steps for the next frame
\ThreeDPresSteps{{3DobjA,7},{3DobjB,5}}
\begin{frame}{...}
\includemedia[label=3DobjA,3Dviews=3DviewsA.txt,...]{...}{...}
\includemedia[label=3DobjB,3Dviews=3DviewsB.txt,...]{...}{...}
\end{frame}
% clear 3D presentation steps before next frame
\ThreeDPresStepsReset
...
Minimal example with two 3D objects (2 xdice.u3d) in a beamer frame:
\documentclass{beamer}
\usepackage{media9}[2015/11/02]
%write file with 7 predefined 3D views
\usepackage{filecontents}
\begin{filecontents*}{3Dviews.txt}
VIEW=Front
ROO=27
END
VIEW=Back
ROO=27
C2C=0 1 0
END
VIEW=Left
ROO=27
C2C=-1 0 0
END
VIEW=Right
ROO=27
C2C=1 0 0
END
VIEW=Top
ROO=27
C2C=0 0 1
END
VIEW=Bottom
ROO=27
C2C=0 0 -1
END
VIEW=Fish Eye at Centre
AAC=130
END
\end{filecontents*}
\ExplSyntaxOn
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% command to build presentation steps for navigating through 3D views
% Argument: comma separated list of {label,number of views} pairs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\ThreeDPresSteps[1]{
\tl_set:Nn\l_initactn_tl{}
\clist_map_inline:nn{#1}{\tl_if_exist:cT{ann@\clist_item:nn{##1}{1}}{
\pbs_pdfobj:nnn{}{dict}{ %init. actions for all 3D objects -> goto 1st view
/S/GoTo3DView/V~0/TA~\use:c{ann@\clist_item:nn{##1}{1}}
}
\tl_put_right:Nx\l_initactn_tl{~\pbs_pdflastobj:}
}}
\pbs_pdfobj:nnn{}{dict}{} %reserve pdf obj for the `Next' nav. node
\tl_set:Nx\l_nextnode_tl{\pbs_pdflastobj:}
%primary nav. node, initialise all 3D objects in the page
\pbs_pdfobj:nnn{}{dict}{
/NA<</S/Named/N/NOP/Next[\l_initactn_tl]>>/Next~\l_nextnode_tl
}
\tl_set:Nn\l_prevactn_tl{}\tl_set:Nx\l_prevnode_tl{/Prev~\pbs_pdflastobj:}
\tl_set_eq:NN\l_currnode_tl\l_nextnode_tl
%register primary navigation node of this page
\sys_if_output_pdf:TF{
\edef\pdfpageattrsave{\the\pdfpageattr}
\tl_set:Nx\l_temp_tl{\pdfpageattrsave/PresSteps~\pbs_pdflastobj:}
\immediate\pdfpageattr\exp_after:wN{\l_temp_tl}
}{
\bool_if:NTF\g_pbs_dvipdfmx_bool{ %dvipdfmx/XeTeX
\special{pdf:put~@thispage <</PresSteps~\pbs_pdflastobj:>>~}
}{
\special{ps:~
mark~{ThisPage}~<</PresSteps~\pbs_pdflastobj:>>/PUT~pdfmark~
}
}
}
%build doubly linked list of navigation nodes
\clist_map_inline:nn{#1}{
\tl_if_exist:cT{ann@\clist_item:nn{##1}{1}}{
\int_step_inline:nnnn{1}{1}{\int_eval:n{\clist_item:nn{##1}{2}-1}}{
\pbs_pdfobj:nnn{}{dict}{} %reserve pdf obj for the `Next' nav. node
\tl_set:Nx\l_nextnode_tl{\pbs_pdflastobj:}
\pbs_pdfobj:nnn{\l_currnode_tl}{dict}{ %current navigation node
\l_prevactn_tl\l_prevnode_tl
/NA<</S/GoTo3DView/V/N/TA~\use:c{ann@\clist_item:nn{##1}{1}}>>
/Next~\l_nextnode_tl
}
\tl_set:Nx\l_prevactn_tl{
/PA<</S/GoTo3DView/V/P/TA~\use:c{ann@\clist_item:nn{##1}{1}}>>}
\tl_set:Nx\l_prevnode_tl{/Prev~\pbs_pdflastobj:}
\tl_set_eq:NN\l_currnode_tl\l_nextnode_tl
}
}
}
%final navigation node
\pbs_pdfobj:nnn{\l_currnode_tl}{dict}{\l_prevactn_tl\l_prevnode_tl}
}
\newcommand\ThreeDPresStepsReset{ %cmd for resetting pres. steps
\bool_if:nT{
\sys_if_output_pdf_p: && \cs_if_exist_p:N\pdfpageattrsave}{
\immediate\pdfpageattr\exp_after:wN{\pdfpageattrsave}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatother
\ExplSyntaxOff
\begin{document}
\begin{frame}{Intro}
Put the Reader into \Acrobatmenu{FullScreen}{\color{blue}Full Screen Mode} first!
\end{frame}
% initialise 3D presentation steps for the next frame
\ThreeDPresSteps{{diceA,7},{diceB,7}}
\begin{frame}{Go forth and back through 3D views using $\leftarrow$ and $\rightarrow$}
\centering
\includemedia[
label=diceA,
width=0.3\textheight,height=0.3\textheight,
activate=pageopen,deactivate=pageclose,
3Dviews=3Dviews.txt,
]{}{dice.U3D}
\includemedia[
label=diceB,
width=0.3\textheight,height=0.3\textheight,
activate=pageopen,deactivate=pageclose,
3Dviews=3Dviews.txt,
]{}{dice.U3D}
\end{frame}
% clear 3D presentation steps
\ThreeDPresStepsReset
\begin{frame}{The End}
\dots
\end{frame}
\end{document}
\ThreeDPresSteps{{diceA,7},{diceB,7}}Has someone tried it to compile,too? – Grandement Nov 19 '15 at 19:48