summaryrefslogtreecommitdiff
path: root/texmf-dist/source/latex/rmannot/examples/rma/vpx-btn.tex
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/source/latex/rmannot/examples/rma/vpx-btn.tex')
-rw-r--r--texmf-dist/source/latex/rmannot/examples/rma/vpx-btn.tex90
1 files changed, 90 insertions, 0 deletions
diff --git a/texmf-dist/source/latex/rmannot/examples/rma/vpx-btn.tex b/texmf-dist/source/latex/rmannot/examples/rma/vpx-btn.tex
new file mode 100644
index 00000000..6abd2873
--- /dev/null
+++ b/texmf-dist/source/latex/rmannot/examples/rma/vpx-btn.tex
@@ -0,0 +1,90 @@
+\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}
+
+\useVideoPlayerX
+
+\margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
+\screensize{5in}{5.5in} % height, width
+
+\DeclareDocInfo
+{
+ title=The \texttt{rmannot} Package\texorpdfstring{\\[1ex]}{: }Playing Videos with VPX,
+ author=D. P. Story,
+ university=Acro\negthinspace\TeX.Net,
+ email=dpstory@acrotex.net,
+ subject={Demo of the rmannot package, playing and streaming videos},
+ keywords={Adobe Acrobat, JavaScript, VideoPlayerX, ActionScript, RMA},
+ talksite=\url{http://www.acrotex.net},
+ talkdate={October 2016},
+ copyrightStatus=True,
+ copyrightNotice={Copyright (C) 2008--\the\year, D. P. Story},
+ copyrightInfoURL=http://www.acrotex.net
+}
+\talkdateLabel{Published:}
+
+\def\AcroTeX{Acro\!\TeX}
+
+\newcommand{\myRMFiles}{%
+ C:/Users/Public/Documents/My TeX Files/%
+ tex/latex/aeb/aebpro/rmannot/RMfiles}
+\saveNamedPath{horse1}{\myRMFiles/horse1.flv}
+\saveNamedPath{playtime}{\myRMFiles/sample.flv}
+\saveNamedPath{elephants}{http://www.math.uakron.edu/~dpstory/videos/elephants.flv}
+\saveNamedPath{loadingvid}{\myRMFiles/loadingvid.mp4}
+\saveNamedPath{skin8}{\PathToSkins/MinimaUnderPlayBackSeekCounterVolMuteNoFull.swf}
+\makePoster[hiresbb]{aebmovie_poster}{aebmovie_poster}
+
+\begin{insDLJS}{playerJS}{JS for VPX}
+var isOver=/over(?!.*?\/)/i; // search for "over" even in a url
+function playerX(rm,source,skin,skinColor) {
+ rm.activated = true;
+ rm.callAS(\mmSkin, skin);
+ if ( isOver.test(skin) ) rm.callAS(\mmSkinAutoHide, true);
+ rm.callAS(\mmSkinColor, skinColor);
+ rm.callAS(\mmSource, source);
+ rm.callAS(\mmShowLoopButton, false);
+ rm.callAS(\mmPlay);
+}
+function vpx_init(r,pg) {
+ var rm=this.getAnnotRichMedia(pg,r);
+ rm.callAS(\mmIsLooping,false);
+ rm.callAS(\mmSetScaleMode, "maintainAspectRatio"); // "noScale", "exactFit", "maintainAspectRatio" (alias "showAll")
+}
+\end{insDLJS}
+
+\newcommand\playJS[3]{%
+ var rm = this.getAnnotsRichMedia(this.pageNum)[0];\r
+ if (rm.activated)\r\t
+ playerX(rm,"#1","\Name{#2}","#3");\r
+ else {\r\t
+ rm.activated=true;\r\t
+ var _to=app.setTimeOut('playerX(rm,"#1","\Name{#2}","#3")',1000);\r
+ }
+}
+
+\parindent=0pt\parskip6pt\pagestyle{empty}
+
+\begin{document}
+
+\maketitle
+
+\begin{center}%\previewtrue
+\resizebox{.67\linewidth}{!}
+ {\rmAnnot[poster=aebmovie_poster,skin=none,name=myRMA,
+ resources={horse1,playtime,skin1,skin2,skin3}]{320bp}{240bp}{loadingvid}}\\[3bp]
+ \pushButton[\TU{Embedded}\CA{Horse}\A{\JS{\playJS{\Name{horse1}}{skin2}{0x5F5F5F}}}]{playHorse}{}{11bp}\kern1bp
+ \pushButton[\TU{Embedded}\CA{Playing}\A{\JS{\playJS{\Name{playtime}}{skin2}{0xFF0000}}}]{playTime}{}{11bp}\kern1bp
+ \pushButton[\TU{Streamed}\CA{Elephants}\A{\JS{\playJS{\urlName{elephants}}{skin3}{0x0000FF}}}]{playElephants}{}{11bp}
+\end{center}
+
+\end{document}