summaryrefslogtreecommitdiff
path: root/texmf-dist/source/latex/rmannot/examples/rma/tst_mp3.tex
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/source/latex/rmannot/examples/rma/tst_mp3.tex')
-rw-r--r--texmf-dist/source/latex/rmannot/examples/rma/tst_mp3.tex137
1 files changed, 137 insertions, 0 deletions
diff --git a/texmf-dist/source/latex/rmannot/examples/rma/tst_mp3.tex b/texmf-dist/source/latex/rmannot/examples/rma/tst_mp3.tex
new file mode 100644
index 00000000..26b630ea
--- /dev/null
+++ b/texmf-dist/source/latex/rmannot/examples/rma/tst_mp3.tex
@@ -0,0 +1,137 @@
+\documentclass{article}
+\usepackage{amsmath}
+%
+% the driver line is not necessary if you
+% have aebpro.cfg configured to your driver.
+%
+\usepackage[%
+% driver=dvips,
+ web={pro,tight,usesf},
+ eforms,graphicxsp={showembeds}
+]{aeb_pro}
+\usepackage{rmannot}
+\usepackage{graphicxbox}
+
+\margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
+\screensize{5in}{5.5in} % height, width
+
+\DeclareDocInfo
+{
+ title=The \texttt{rmannot} Package\texorpdfstring{\\[1ex]}{: } Demo of MP3 Player,
+ author=D. P. Story,
+ university=Acro\negthinspace\TeX.Net,
+ email=dpstory@acrotex.net,
+ subject=Demo of the acroflex and the rmannot package,
+ keywords={Adobe Acrobat, JavaScript, Adobe FLEX 3, ActionScript},
+ talksite=\url{http://www.acrotex.net},
+ talkdate={July 2008},
+ copyrightStatus=True,
+ copyrightNotice={Copyright (C) \the\year, D. P. Story},
+ copyrightInfoURL=http://www.acrotex.net
+}
+\talkdateLabel{Published:}
+
+% Place \AcroVer{11} in rmannot.cfg, or uncomment line below
+%\AcroVer{11}
+% The argument corresponds to the version of Acrobat you have
+
+%
+% Convenience command pointing to the rich media files, this needs
+% to be edited to point to its location on your system.
+%
+\newcommand{\myRMFiles}{%
+ C:/Users/Public/Documents/My TeX Files/%
+ tex/latex/aeb/aebpro/rmannot/RMfiles}
+\saveNamedPath{tardis}{\myRMFiles/tardis1.mp3}
+
+\parindent=0pt\parskip6pt\pagestyle{empty}
+
+\begin{document}
+
+\maketitle
+
+\null\vfil
+
+\begin{center}
+\Large\bfseries\color{blue}The Tardis of Dr.\ Who\\[2ex]
+\makebox[\linewidth][c]{%
+ \resizebox{!}{14bp}{\rmAnnot{268bp}{28bp}{tardis}%
+}}
+\end{center}
+
+Above is the basic appearance of the MP3 file, basically, just the control
+bar.
+
+On the next page is a fancy version, obtained by using a graphic background.
+
+
+\newpage
+
+\begin{center}
+
+%%BoundingBox: 0 0 528 862
+%%HiResBoundingBox: 0 0 528 861.1200
+
+
+\resizebox{!}{.9\textheight}{\graphicxbox{tardis}{%
+ \begin{minipage}[b][861.12bp-2\fboxsep]{528bp-2\fboxsep}
+\makebox[\linewidth][c]{%
+ \resizebox{.67\linewidth}{!}{\rmAnnot{268bp}{28bp}{tardis}}}%
+ \end{minipage}}}
+\end{center}
+
+\newpage
+
+Currently, a rich media annotation has no hidden property, you can, however, move it off the page
+and control the play using a form button or link action.
+
+Here are examples:\makebox[0pt][r]{\resizebox{!}{5bp}
+%
+% We give this annot a particular name, so we can get the AnnotRichMedia
+% object using the JavaScript method this.getAnnotRichMedia.
+%
+{\rmAnnot[name=TardisOfDrWho]{268bp}{28bp}{tardis}}\hspace{24in}}
+A form field {\small\pushButton[\textSize{7}\CA{Play!}\S{S}\A{\JS{%
+ var rm=this.getAnnotRichMedia({nPage: this.pageNum, cName: "TardisOfDrWho"});\r
+ if (rm.activated) rm.callAS("multimedia_play");\r
+ else rm.activated=true;
+}}]{tardisBtn}{}{9bp}} or a link
+\setLinkText[\A{\JS{%
+ var rm=this.getAnnotRichMedia({nPage: this.pageNum, cName: "TardisOfDrWho"});\r
+ if (rm.activated) rm.callAS("multimedia_play");\r
+ else rm.activated=true;
+}}]{play the tardis}!
+
+The verbatim listing is given below.
+
+\begingroup\footnotesize
+\begin{verbatim}
+Here are examples:\makebox[0pt][r]{\resizebox{!}{5bp}
+{\rmAnnot[name=TardisOfDrWho]{268bp}{28bp}{tardis}}\hspace{24in}}
+A form field {\small\pushButton[\textSize{7}\CA{Play!}\S{S}\A{\JS{%
+ var rm=this.getAnnotRichMedia({nPage: this.pageNum, cName: "TardisOfDrWho"});\r
+ if (rm.activated) rm.callAS("multimedia_play");\r
+ else rm.activated=true;
+}}]{tardisBtn}{}{9bp}} or a link
+\setLinkText[\A{\JS{%
+ var rm=this.getAnnotRichMedia({nPage: this.pageNum, cName: "TardisOfDrWho"});\r
+ if (rm.activated) rm.callAS("multimedia_play");\r
+ else rm.activated=true;
+}}]{play the tardis}!
+\end{verbatim}
+\endgroup
+
+Using the above techniques, you can also place a link around, for example, a graphic that
+plays the MP3 when clicked. See the demo file \texttt{tst\_flv\_asjs.tex} for a discussion
+of using Acrobat JavaScript to play a rich media clip.
+
+\end{document}
+
+
+
+\setLinkText[\A{\JS{%
+ var rm=this.getAnnotRichMedia({nPage: this.pageNum, cName: "acrolimerick"});\r
+ if (rm.activated) rm.callAS("multimedia_play");\r
+ else rm.activated=true;
+}}]{\includegraphics[width=2in]{AeB_Logo}}\\[1ex]
+\resizebox{!}{14bp}{\rmAnnot[name=acrolimerick]\rmAnnot{268bp}{28bp}{tardis}}