since months i cant find a way to change pictures by pressing a button in one field. With a text is is like:
\documentclass[a4paper]{article}
\usepackage{eforms}
\begin{insDLJS}[test]{test}{JavaScript}
function MakeArray(2){
this.length=n
return this
};
var text=new MakeArray(2);
text[0]='text111';
text[1]='text222';
this.getField("field").value=text[0];
\end{insDLJS}
%
\begin{document}
\textField[\BG{}\BC{}]{field}{80mm}{10mm}\\
\pushButton[\A{\JS{this.getField("field").value=text[1];}}]{myButton}{30mm}{15mm}\\
\pushButton[\A{\JS{this.getField("field").value=text[0];}}]{myButton}{30mm}{15mm}
\end{document}
But now i want to do the same with pictures in the same way that the picture changes by pressing the buttons. Is there something like: \pictureField[]{}{} or something simmilar?
EDIT
Thanks for the answer, but the problem is the media9 package. I have lubuntu tex-live fully updated with the most actual l3kernel (2014/...), so the other l3-packages. It still produces different errors, mostly: l3kernel too old, and some other funny errors. Found no way to get media9 operating. So i am sorry for asking again:
Is there any way to do exactly this in your example but without the media9 package?
var text=new MakeArray(2);
withvar text=new Array(2);
and delete the function def. – AlexG Dec 16 '14 at 10:23