5

I'm trying to create an animation using the animateinline environment from the animate package. More precisely, I want to remove the mouse listener from the animation itself, so that it is controlled exclusively by the media buttons I place.

(In other words, I'm trying to make clicking on the "A" or "B" do nothing, or, ideally, make it just select them as if they were normal text.)

I've tried placing a tikzpicture above the entire thing, but that didn't work. I also haven't found anything in the animate package documentation regarding this.

The mediabuttons are needed to later control multiple animateinline environments with the same button, which to my knowledge the standard controls option cannot do.

Any help is much appreciated.

MWE:

\documentclass[a4paper]{article}

\usepackage{animate}
\usepackage{media9}
\usepackage{tikz}

\begin{document}

\begin{animateinline}[
    label=myAnim,
    autoplay = false,
    step = true,
    loop = true,
    autoresume = false,
    autopause = false
]{1}
    \begin{tikzpicture}
        \node at (0,0) {A};
    \end{tikzpicture}
    \newframe
    \begin{tikzpicture}
        \node at (0,0) {B};
    \end{tikzpicture}
\end{animateinline}

\mediabutton[
    jsaction={
        % ensures frameNum stays within range
        if(anim.myAnim.frameNum > 0){
            anim.myAnim.frameNum--
        }
    }
]{\fbox{\strut Previous}}
\mediabutton[
    jsaction={
        % ensures frameNum stays within range
        if(anim.myAnim.frameNum < anim.myAnim.numFrames - 1){
            anim.myAnim.frameNum++
        }
    }
]{\fbox{\strut Next}}

\end{document}

closed as off-topic by Max, TeXnician, Bobyandbob, siracusa, user36296 Sep 30 '18 at 14:11

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    You can add the nomouse option. It's described on page 8 of the documentation. – Max Sep 30 '18 at 2:52
  • 2
    I'm so embarrassed I didn't see that in the documentation, I should've read more carefully. This solves my problem completely. Thank you so much! – ABlueChameleon Sep 30 '18 at 10:23
  • 2
    Well I can see from your question that you put quite some effort in, so that lets me assume that you also already put some effort in reading the manual. IMHO there's no shame in missing something in any manual and therefore asking here, only in asking when you haven't even checked the manual. Off-topic: I believe this is your first question so let met Welcome you to TeX.SX! – Max Sep 30 '18 at 11:50
  • The closing reason is a bit weird. Isn't there something like "was answered in the comments" or similar available as a closing reason? – AlexG Sep 30 '18 at 16:38
  • 1
    @AlexG I agree, so hereby: I voted to close this question as off-topic, because it is solved in the comments. – Max Oct 1 '18 at 7:25

Browse other questions tagged or ask your own question.