summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/media9
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-31 00:00:31 +0000
committerKarl Berry <karl@freefriends.org>2013-01-31 00:00:31 +0000
commitabb000d9b877f6ae30b59469cb8ddc0bdc2471c7 (patch)
tree988e23309732f2ed74aa6393a8720620f6d632a4 /Master/texmf-dist/doc/latex/media9
parenta39ede1ed9e87ec13ea9f8407c989fd24223afea (diff)
media9 (30jan13)
git-svn-id: svn://tug.org/texlive/trunk@28994 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/media9')
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog4
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin1955423 -> 1972925 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex182
3 files changed, 128 insertions, 58 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index de69f360ce6..b83e40e354e 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-31
+ * v0.22
+ * new: user command \mediabutton for creating media control buttons
+
2013-01-23
* v0.21
* fix: swf media inserted after a 3D object didn't work, reported by C.
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 397badd4a6f..18c3fd6c3c0 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.pdf
+++ b/Master/texmf-dist/doc/latex/media9/media9.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex
index ec55465fe7d..3dd94675dfe 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -172,12 +172,15 @@ Except for `\verb+dvipdfmx+', `\verb+xetex+' and `\verb+bigfiles+', the options
Option `\verb+bigfiles+' is only relevant for the \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+ workflow. It may be needed if large media files cause \verb+latex+ to abort with error `\verb+TeX capacity exceeded+'. See Sect.\ \ref{bugs}.
\section{The user interface}
-Package `media9' provides the command
+Package `media9' provides commands for media inclusion (\verb+\includemedia+) and insertion of media control buttons (\verb+\mediabutton+). The latter is introduced in Sect. \ref{mbtn}.
+
+\subsection{Media inclusion}
\begin{verbatim}
\includemedia[<options>]{<poster text>}{
<main Flash (SWF) file or URL | 3D (PRC, U3D) file>}
\end{verbatim}
-Its last argument, \verb+<main Flash (SWF) file or URL | 3D (PRC, U3D) file>+, is the main interactive application to be inserted into the PDF. In case of Flash, this can be a local SWF file, or a URL, such as a YouTube video. A local file will become part of the final PDF file, while Flash content from a URL requires an internet connection when the user activates it in Adobe Reader. As for 3D content, Adobe Reader only supports U3D or PRC files embedded in the PDF; they cannot be loaded or streamed during runtime. The most frequent use of \verb+\includemedia+ will likely be embedding video or sound files for playback in Adobe Reader. For this we need some media player, which is an SWF file we embed as our main application. It will be configured to load, upon activation, a particular video or sound file that was embedded as a resource into the PDF or is to be streamed from the internet. This will be shown later. Note that a local file (main application or resource) will only once be physically embedded in order to keep final PDF file size small. If the same file (identified by MD5 checksum) appears in other \verb+\includemedia+ commands, only a reference will be inserted that points to the same storage location in the PDF.
+
+The last, \verb+<main Flash (SWF) file or URL | 3D (PRC, U3D) file>+, is the main interactive application to be inserted into the PDF. In case of Flash, this can be a local SWF file, or a URL, such as a YouTube video. A local file will become part of the final PDF file, while Flash content from a URL requires an internet connection when the user activates it in Adobe Reader. As for 3D content, Adobe Reader only supports U3D or PRC files embedded in the PDF; they cannot be loaded or streamed during runtime. The most frequent use of \verb+\includemedia+ will likely be embedding video or sound files for playback in Adobe Reader. For this we need some media player, which is an SWF file we embed as our main application. It will be configured to load, upon activation, a particular video or sound file that was embedded as a resource into the PDF or is to be streamed from the internet. This will be shown later. Note that a local file (main application or resource) will only once be physically embedded in order to keep final PDF file size small. If the same file (identified by MD5 checksum) appears in other \verb+\includemedia+ commands, only a reference will be inserted that points to the same storage location in the PDF.
Argument \verb+<poster text>+ defines the size of the rectangular region of the document page in which the media will be displayed. Moreover, \verb+<poster text>+ will be shown in case the media has not been activated.
%(Internally, \verb+<poster text>+ is put into a \LaTeX{} box, which is used as the appearance of the PDF annotation, i.\,e. the interactive region created by \verb+\includemedia+, in PDF specification parlance.)
@@ -191,7 +194,7 @@ This command appends one directory at a time to the search list. To specify more
The following section explains all command options provided. They are passed to the media inclusion command as a comma separated list enclosed in a pair of square brackets.
-\section{Command options}
+\subsection{Command options}
A subset of the command options (see Sect. \ref{pkguse}) can also be used as package options, which lets them apply to all embedded media. Some of the options listed here are meaningful only for a specific media type (either Flash or 3D), which will be noted explicitly if not obvious. Dedicated sections covering Flash, video and sound as well as 3D inclusion will follow later on in this document.
\begin{verbatim}
@@ -202,9 +205,9 @@ depth=<depth>
Resize the media playback area, overriding the original dimensions of the {\tt<poster text>} argument. Option `\verb+depth+' specifies how far the playback area should extend below the base line of the running text. If only one of `\verb+width+' or `\verb+height+' is given, the other dimension is scaled to maintain the aspect ratio of \verb+<poster text>+. Any valid \TeX{} dimension is accepted as a parameter. In addition, the length commands \verb+\width+, \verb+\height+, \verb+\depth+ and \verb+\totalheight+ can be used to refer to the original dimensions of \verb+<poster text>+.
\begin{verbatim}
-label=<label string>
+label=<label key>
\end{verbatim}
-The media annotation is given a label, \verb+<label string>+, which should be unique. This option defines JavaScript reference \verb+annotRM['<label string>']+ for easy accessing the media annotation object from within JavaScript. Note that the reference is known only after the first opening of the page containing the media. For an example, see Fig.~\ref{videoa}.
+The media annotation is given a label, \verb+<label key>+, which should be unique. Labelled media annotations can be targeted by the media actions of a control button (see description of the \verb+\mediabutton+ command in Sect. ~\ref{mbtn}). Moreover, a reference to the RichMedia Annotation object (of type `\verb+AnnotRichMedia+') is assigned to the JavaScript variable \verb+annotRM['<label key>']+ in order to facilitate its access in JavaScript. Note that the JavaScript reference is known only after the first opening of the page containing the media.
\begin{verbatim}
scale=<factor>
@@ -334,6 +337,7 @@ Sets the default render mode. The following values are honoured: `\verb+Solid+',
When the user selects another view from the list of predefined views (see option `\verb+3Dviews+'), attributes of individual parts, such as opacity, visibility, render mode,
translation in space,
which all can be set from within the Reader or by means of a file of predefined views, are reset to their original states as defined in the embedded 3D file, before any new part settings are applied. This default behaviour can be overridden by `\verb+3Dpartsattrs=keep+'. This will preserve current part attributes when the user selects another predefined 3D view in the Reader.
+\hypertarget{3Dviews}{}%
\begin{verbatim}
3Dviews=<views file>
\end{verbatim}
@@ -397,6 +401,7 @@ A non-negative \verb+<integer number>+ represents the number of times the animat
3Dplayspeed=<positive number>
\end{verbatim}
This option can be used to adjust the keyframe animation speed. A value of `1' corresponds to the default speed defined in the 3D file.
+\hypertarget{add3Djscript}{}%
\begin{verbatim}
add3Djscript=<3D JavaScript file>,
add3Djscript=<another 3D JavaScript file>,
@@ -462,7 +467,39 @@ Things like animation, lighting, background of 3D objects etc. may also be scrip
\end{tabular}
\end{table}
-\clearpage
+\subsection{Control buttons}\label{mbtn}
+\begin{verbatim}
+\mediabutton[<options>]{<normal button text or graphic>}
+\end{verbatim}
+This command inserts a clickable button for media control. Actions to be performed are specified through options `\verb+mediacommand+', `\verb+3Dgotoview+' and `\verb+jsaction+'. By using these options repeatedly and in any combination, several actions can be bound to one media button, and one media button can be used to control several media at the same time. Media actions are started in the given order but performed in parallel, because they do not wait for each other to finish. The target of an action is specified via the label key that was also given to a particular media by the `\verb+label+' option of `\verb+\includemedia+'. Individual button faces can be defined for the `mouse-over' and `mouse-button-down' events using the `\verb+overface+' and `\verb+downface+' options. Without options, the button produced does nothing. The options provided are as follows:
+
+\begin{verbatim}
+overface=<mouse-over text or graphic>
+\end{verbatim}
+If specified, the media button changes its appearance when the mouse pointer is moved over it. Without this option, the button appearance does not change. An \verb+\includegraphics+ command may need to be enclosed in braces.
+
+\begin{verbatim}
+downface=<mouse-button-down text or graphic>
+\end{verbatim}
+If specified, the media button changes its appearance when the mouse button is pressed while the pointer is over it. Without this option, the pressed button is visualized by colour inversion of the normal button appearance. An \verb+\includegraphics+ command may need to be enclosed in braces.
+
+\begin{verbatim}
+3Dgotoview=<label key>[:<view specification>]
+\end{verbatim}
+Selects a view from the list of predefined views associated with a 3D media inclusion (see option `\verb+3Dviews+'). The target media is specified by \verb+<label key>+, as defined by the `\verb+label+' option of `\verb+\includemedia+'. \verb+<label key>+ alone without a view specification simply activates the 3D object if not yet activated. {\tt<view specification>} which is separated from the label key by a colon (\verb+:+) can be one of the following: an integer specifying the zero-based index into the list of views in the 3D views file; one of `\verb+D+', `\verb+F+', `\verb+L+', `\verb+N+', `\verb+P+' indicating the default, first, last, next or previous view in the list of views; a string delimited by `\verb+(+' and `\verb+)+' matching the name of a view as specified by the `\verb+VIEW=...+' entry in the views file. The option can be given several times to simultaneously change the view in more than one 3D inclusion. However, it cannot be used to create an animation effect within the same 3D inclusion, because \verb+3Dgotoview+ actions are executed in parallel.
+%For this, one may implement a 3D JavaScript function that is associated with the media button using the `\verb+mediacommand+' option.
+
+\begin{verbatim}
+mediacommand=<label key>[:<command> [<arg1> <arg2> ...]]
+\end{verbatim}
+A media command \verb+<command>+, with arguments if required, is sent to a media inclusion identified by \verb+<label key>+, as defined by the `\verb+label+' option of `\verb+\includemedia+'. \verb+<label key>+ alone without a command specification simply activates the media, if not yet activated. The option can be multiply used within the same button to target different media inclusions at the same time or to execute several commands for the same media. Depending on the type of the target media (3D or Flash), \verb+<command>+ is either the name of a JavaScript function defined in a 3D JavaScript file associated with the 3D media (see option `\verb+add3Djscript+') or the name of an ActionScript function that was exposed by the embedded Flash file. ActionScript functions are exposed to the scripting context of the hosting document by using the \verb+ExternalInterface+ call within the Flash file. Arguments to be passed to \verb+<command>+ must be enclosed in `\verb+[+' and `\verb+]+' and separated by spaces. Arguments can be of Boolean type (\verb+true+, \verb+false+), numbers (integer, reals) and strings. String arguments must be passed as \verb+(string arg)+, i.\,e. enclosed in parentheses, while numbers and Booleans are passed as they are. Of course, the number of arguments and their types must match the definition of the function to be called. Media players VPlayer.swf and APlayer.swf shipping with media9 expose a number of ActionScript functions that can be used with this option (see Tab. \ref{AVPlayerMethods}).
+
+\begin{verbatim}
+jsaction=[<label key>:]{<JavaScript code>}
+\end{verbatim}
+The JavaScript code is executed in the context of the document's instance of the JavaScript engine (there is one instance of the JavaScript engine per open document in Adobe Reader). \verb+<JavaScript code>+ is required and must be enclosed in braces. Unlike media actions defined with options `\verb+mediacommand+' and `\verb+3Dgotoview+', the JavaScript action defined here is not targeted at a particular embedded media and can be used to run arbitrary code. Therefore, \verb+<label key>+ is optional. If provided, it must be separated from \verb+<JavaScript code>+ by a colon. However, it is recommended to provide a label key. It ensures that \verb+annotRM['<label key>']+ is a valid JavaScript reference to the \verb+AnnotRichMedia+ object. \verb+annotRM['<label key>']+ can be used to get access to the global context of the annotation's instance of the 3D JavaScript engine (there is one instance of the 3D JavaScript engine per activated RichMedia Annotation with 3D content). The 3D JavaScript context of a 3D model can be accessed as \verb+annotRM['<label key>'].context3D+. Refer to the Acrobat 3D JavaScript Reference~\cite{jscript3D} for details on built-in JavaScript objects that are available in the 3D context.
+
+%\clearpage
\section[Embedding Flash, video and sound (with examples)]{Embedding Flash, video and sound}
A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example of loading Flash content from a URL to be displayed in an embedded fashion in a PDF document. Indeed, a YouTube clip is nothing more than a small SWF file which loads a video stream and other necessary resources, such as user controls and a player skin from a remote server. It can be configured via ActionScript variables, to play several videos in a row, to play a video in a loop etc. Player parameters are documented on \url{http://code.google.com/apis/youtube/player_parameters.html} and can be passed to the player using either the `\verb+flashvars+' option, as in the example, or appended to the URL string after the video ID. A question mark `\verb+?+' must be put between the video ID and the parameter string. Some of the documented parameters, such as `\verb+rel+', seem to have an effect only if they are passed as part of the URL.
@@ -511,10 +548,10 @@ Like YouTube videos, media players are configured via ActionScript variables whi
Playback of embedded video files is shown in Fig.~\ref{videoa}. Besides embedded files, also video streamed from remote servers via HTTP and RTMP protocols is supported, as shown in Fig.~\ref{videob}.
-`VPlayer.swf' and `APlayer.swf' expose a number of ActionScript functions to the JavaScript engine of Adobe Reader, allowing for playback control of media through PDF interactive forms and various trigger events. The functions and their calling convention are listed in Table~\ref{AVPlayerMethods}. An example of playing and pausing a video clip and setting the video source via interactive push buttons is given in Fig.~\ref{videoa}.
+`VPlayer.swf' and `APlayer.swf' expose a number of ActionScript functions to the JavaScript engine of Adobe Reader, allowing for playback control of media through push buttons (see Sect. \ref{mbtn}) and various trigger events. The functions and their calling convention are listed in Table~\ref{AVPlayerMethods}. An example of playing and pausing a video clip and setting the video source via interactive push buttons is given in Fig.~\ref{videoa}.
Sound files and streams in the MP3 format can be played with `APlayer.swf'. Fig.~\ref{radio} contains examples of an audio live stream and a remote MP3 sound file. In one of the sound examples, the player is loaded from a CTAN mirror during runtime because an internet connection is required anyway for streaming the audio. If a local sound file is to be embedded into the PDF this would have to be done in the same way as with the video file in one of the previous examples using the `\verb+addresource+' option.
-\clearpage
+%\clearpage
\begin{table}
\centering
@@ -548,7 +585,7 @@ parameter & description\\\hline\hline
\begin{table}[p]
\centering
-\caption{Exposed ActionScript functions of media players `VPlayer.swf' and `APlayer.swf', that can be called from JavaScript using the `{\tt callAS}' method of the `{\tt AnnotRichMedia}' JavaScript object. Calling convention: \hbox to \linewidth {\hss\tt <RMA reference>.callAS('<function>' [,'<argument>']);\hss} Function name and its argument must be given as quoted strings. See~\cite{jscript} for further information.}\label{AVPlayerMethods}
+\caption{Exposed ActionScript functions of media players `VPlayer.swf' and `APlayer.swf', that can be called from within media buttons (see Sect. \ref{mbtn}) or from JavaScript using the `{\tt callAS}' method of the `{\tt AnnotRichMedia}' JavaScript object (see~\cite{jscript} for further information).}\label{AVPlayerMethods}
\begin{tabular}[t]{lp{0.25\linewidth}p{0.5\linewidth}}\hline
function & argument &description\\\hline\hline
{\tt play} & & play media\\
@@ -590,7 +627,7 @@ parameter & description\\\hline\hline
\centering
\begin{Verbatim}
\includemedia[
- label=some_dice, % defines JavaScript object annotRM['some_dice']
+ label=some_dice,
width=0.4\linewidth,height=0.3\linewidth,
activate=pageopen,
addresource=random.mp4, %two video files
@@ -602,24 +639,17 @@ parameter & description\\\hline\hline
}
]{}{VPlayer.swf}
-\PushButton[ %requires package `hyperref'
- onclick={
- annotRM['some_dice'].activated=true;
- annotRM['some_dice'].callAS('playPause');
- }
-]{\fbox{Play/Pause}}
-\PushButton[
- onclick={
- annotRM['some_dice'].activated=true;
- annotRM['some_dice'].callAS('setSource', 'random.mp4');
- }
-]{\fbox{random.mp4}}
-\PushButton[
- onclick={
- annotRM['some_dice'].activated=true;
- annotRM['some_dice'].callAS('setSource', 'cube.mp4');
- }
-]{\fbox{cube.mp4}}
+\mediabutton[
+ mediacommand=some_dice:playPause,
+ overface=\color{blue}{\fbox{\strut Play/Pause}},
+ downface=\color{red}{\fbox{\strut Play/Pause}},
+]{\fbox{\strut Play/Pause}}
+\mediabutton[
+ mediacommand=some_dice:setSource [(random.mp4)],
+]{\fbox{\strut random.mp4}}
+\mediabutton[
+ mediacommand=some_dice:setSource [(cube.mp4)],
+]{\fbox{\strut cube.mp4}}
\end{Verbatim}
\vspace{1ex}
\makebox[\linewidth]{\hfill\includemedia[
@@ -635,11 +665,19 @@ parameter & description\\\hline\hline
}
]{}{VPlayer.swf}\hfill}
\makebox[\linewidth]{\hfill%
- \PushButton[onclick={annotRM['some_dice'].activated=true;annotRM['some_dice'].callAS('playPause');}]{\fbox{\strut Play/Pause}}
- \PushButton[onclick={annotRM['some_dice'].activated=true;annotRM['some_dice'].callAS('setSource', 'random.mp4');}]{\fbox{\strut random.mp4}}
- \PushButton[onclick={annotRM['some_dice'].activated=true;annotRM['some_dice'].callAS('setSource', 'cube.mp4');}]{\fbox{\strut cube.mp4}}
+\mediabutton[
+ mediacommand=some_dice:playPause,
+ overface=\color{blue}{\fbox{\strut Play/Pause}},
+ downface=\color{red}{\fbox{\strut Play/Pause}},
+]{\fbox{\strut Play/Pause}}
+\mediabutton[
+ mediacommand=some_dice:setSource [(random.mp4)],
+]{\fbox{\strut random.mp4}}
+\mediabutton[
+ mediacommand=some_dice:setSource [(cube.mp4)],
+]{\fbox{\strut cube.mp4}}
\hfill}
-\caption{Example of playing back two different embedded MP4 video files in the same video player instance. The player, `VPlayer.swf', is also embedded in the PDF. Exposed ActionScript functions `{\tt playPause}' and `{\tt setSource}' of `VPlayer.swf' (Table~\ref{AVPlayerMethods}) are used to set-up the JavaScript actions of interactive push buttons.}\label{videoa}
+\caption{Example of playing back two different embedded MP4 video files in the same video player instance. The player, `VPlayer.swf', is also embedded in the PDF. Exposed ActionScript functions `{\tt playPause}' and `{\tt setSource}' of `VPlayer.swf' (Table~\ref{AVPlayerMethods}) are used to set-up media control buttons. Different button faces have been defined for the Play/Pause button.}\label{videoa}
\end{figure}
\begin{figure}[p]
@@ -774,17 +812,22 @@ Below, several examples of embedded 3D files are shown. The first one, Fig.~\ref
\end{figure}
\begin{figure}[bp]
-\begin{Verbatim}
+\begin{Verbatim}[fontsize=\footnotesize]
\includemedia[
+ label=dice,
width=0.5\linewidth,height=0.5\linewidth,
activate=pageopen,
3Dtoolbar, 3Dmenu,
3Dviews=dice.vws,
]{}{dice.u3d}
+
+\mediabutton[3Dgotoview=dice:N]{\fbox{Next view}}
+\mediabutton[3Dgotoview=dice:(Back)]{\fbox{View `Back'}}
+\mediabutton[3Dgotoview=dice:5]{\fbox{6th view in the list}}
\end{Verbatim}
\vspace{1ex}
Contents of `dice.vws':
-\begin{Verbatim}[fontsize=\small]
+\begin{Verbatim}[fontsize=\footnotesize]
VIEW=Front
ROO=27
END
@@ -813,14 +856,18 @@ Contents of `dice.vws':
END
\end{Verbatim}
\centering
-\includemedia[
+\raisebox{-0.7\height}{\includemedia[
+ label=dice,
width=0.5\linewidth,height=0.5\linewidth,
activate=pageopen,
3Dtoolbar,
3Dviews=dice.vws,
3Dmenu,
-]{}{dice.u3d}
-\caption{Embedded U3D file, based on a VRML model by Peter Whitehouse, \url{http://www.wonko.info/vrml/index.htm}; conversion to U3D was done using DeepExploration\textsuperscript{\scriptsize\textregistered}\cite{dexp}. The file `{\tt dice.vws}' provides predefined views to be selected from the 3D toolbar or by right click.}\label{u3dex}
+]{}{dice.u3d}}\quad\parbox[t]{0.4\linewidth}{%
+\mediabutton[3Dgotoview=dice:N]{\fbox{Next view}}\\
+\mediabutton[3Dgotoview=dice:(Back)]{\fbox{View `Back'}}\\
+\mediabutton[3Dgotoview=dice:5]{\fbox{6th view in the list}}}
+\caption{Embedded U3D file, based on a VRML model by Peter Whitehouse, \url{http://www.wonko.info/vrml/index.htm}; conversion to U3D was done using DeepExploration\textsuperscript{\scriptsize\textregistered}\cite{dexp}. The file `{\tt dice.vws}' provides predefined views. Buttons are created with {\tt\string\mediabutton} using the `{\tt 3Dgotoview}' option.}\label{u3dex}
\end{figure}
\begin{figure}
@@ -836,26 +883,26 @@ Contents of `dice.vws':
add3Djscript=malte.js
]{}{malte.u3d}
- \PushButton[
- onclick={annotRM['malte'].context3D.cntrClockWise();}
+ \mediabutton[
+ jsaction=malte:{annotRM['malte'].context3D.cntrClockWise();}
]{\includegraphics[height=1.44em]{boutona}}
- \PushButton[
- onclick={annotRM['malte'].context3D.pause();}
+ \mediabutton[
+ jsaction=malte:{annotRM['malte'].context3D.pause();}
]{\includegraphics[height=1.44em]{boutonb}}
- \PushButton[
- onclick={annotRM['malte'].context3D.clockWise();}
+ \mediabutton[
+ jsaction=malte:{annotRM['malte'].context3D.clockWise();}
]{\includegraphics[height=1.44em]{boutonc}}
\hspace{1em}
- \PushButton[
- onclick={annotRM['malte'].context3D.slower();}
+ \mediabutton[
+ jsaction=malte:{annotRM['malte'].context3D.scaleSpeed(1/1.1);}
]{\includegraphics[height=1.44em]{boutond}}
- \PushButton[
- onclick={annotRM['malte'].context3D.origSpeed();}
+ \mediabutton[
+ jsaction=malte:{annotRM['malte'].context3D.origSpeed();}
]{\includegraphics[height=1.44em]{boutone}}
- \PushButton[
- onclick={annotRM['malte'].context3D.faster();}
+ \mediabutton[
+ jsaction=malte:{annotRM['malte'].context3D.scaleSpeed(1.1);}
]{\includegraphics[height=1.44em]{boutonf}}
- \end{Verbatim}
+ \end{Verbatim}
\centering
\includemedia[
label=malte,
@@ -868,14 +915,33 @@ Contents of `dice.vws':
add3Djscript=malte.js
]{}{malte.u3d}
- \PushButton[onclick={annotRM['malte'].context3D.cntrClockWise();}]{\includegraphics[height=1.44em]{boutona}}
- \PushButton[onclick={annotRM['malte'].context3D.pause();}]{\includegraphics[height=1.44em]{boutonb}}
- \PushButton[onclick={annotRM['malte'].context3D.clockWise();}]{\includegraphics[height=1.44em]{boutonc}}
+ \mediabutton[jsaction=malte:{annotRM['malte'].context3D.cntrClockWise();}]{\includegraphics[height=1.44em]{boutona}}
+ \mediabutton[jsaction=malte:{annotRM['malte'].context3D.pause();}]{\includegraphics[height=1.44em]{boutonb}}
+ \mediabutton[jsaction=malte:{annotRM['malte'].context3D.clockWise();}]{\includegraphics[height=1.44em]{boutonc}}
\hspace{1em}
- \PushButton[onclick={annotRM['malte'].context3D.slower();}]{\includegraphics[height=1.44em]{boutond}}
- \PushButton[onclick={annotRM['malte'].context3D.origSpeed();}]{\includegraphics[height=1.44em]{boutone}}
- \PushButton[onclick={annotRM['malte'].context3D.faster();}]{\includegraphics[height=1.44em]{boutonf}}
- \caption{Animated U3D example of a Maltese drive contributed by Jean-Luc Chesnot. The animation is defined in the JavaScript file `{\tt malte.js}'.}\label{u3dex2}
+ \mediabutton[jsaction=malte:{annotRM['malte'].context3D.scaleSpeed(1/1.1);}]{\includegraphics[height=1.44em]{boutond}}
+ \mediabutton[jsaction=malte:{annotRM['malte'].context3D.origSpeed();}]{\includegraphics[height=1.44em]{boutone}}
+ \mediabutton[jsaction=malte:{annotRM['malte'].context3D.scaleSpeed(1.1);}]{\includegraphics[height=1.44em]{boutonf}}
+% \mediabutton[
+% mediacommand=malte:cntrClockWise
+% ]{\includegraphics[height=1.44em]{boutona}}
+% \mediabutton[
+% mediacommand=malte:pause
+% ]{\includegraphics[height=1.44em]{boutonb}}
+% \mediabutton[
+% mediacommand=malte:clockWise
+% ]{\includegraphics[height=1.44em]{boutonc}}
+% \hspace{1em}
+% \mediabutton[
+% mediacommand=malte:scaleSpeed [0.91]
+% ]{\includegraphics[height=1.44em]{boutond}}
+% \mediabutton[
+% mediacommand=malte:origSpeed
+% ]{\includegraphics[height=1.44em]{boutone}}
+% \mediabutton[
+% mediacommand=malte:scaleSpeed [1.1]
+% ]{\includegraphics[height=1.44em]{boutonf}}
+ \caption{Animated U3D example of a Maltese drive contributed by Jean-Luc Chesnot. The animation and the functions called in the JavaScript actions of the media buttons are defined in the JavaScript file `{\tt malte.js}'.}\label{u3dex2}
\end{figure}
\clearpage
\subsection{3D quick-start guide}\label{sec:3Dtut}
@@ -918,7 +984,7 @@ Contents of `dice.vws':
3Dmenu
]{}{myfile.u3d}
\end{Verbatim}
- If you are satisfied with the predefined views in the views file, the default view first specified through the options of {\tt\string\includemovie} can be deleted. The first view in the views file becomes the default view then.
+ If you are satisfied with the predefined views in the views file, the default view first specified through the options of {\tt\string\includemedia} can be deleted. The first view in the views file becomes the default view then.
\end{itemize}
\item Associate any number of 3D JavaScript files with the 3D object:
\begin{Verbatim}