summaryrefslogtreecommitdiff
path: root/texmf-dist/source/latex/rmannot/examples/rma/tst_cuepts1.tex
blob: 4ffb4bed49ec95444c2e1f5cea895c47133fbe47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\documentclass{article}
\usepackage{amsmath}

\usepackage[%
    web={pro,usesf,tight},
    eforms,graphicxsp={showembeds}
]{aeb_pro}
\usepackage{rmannot}

\margins{.25in}{.25in}{24pt}{.25in} % left,right,top, bottom
\screensize{5in}{5.5in}             % web.sty dimensions

\DeclareDocInfo
{
    title=The \textsf{rmannot} Package\texorpdfstring{\\[6pt]}{: }Testing Cue Points,
    author=D. P. Story,
    university=Acro\negthinspace\TeX.Net,
    email=dpstory@acrotex.net,
    subject=Demo of the rmannot package,
    keywords={Adobe Acrobat, JavaScript, ActionScript, AeB Pro, rmannot},
    talksite=\url{http://www.acrotex.net},
    talkdate={September 24, 2010},
    copyrightStatus=True,
    copyrightNotice={Copyright (C) \the\year, D. P. Story},
    copyrightInfoURL=http://www.acrotex.net
}
\talkdateLabel{Published:}

\def\AcroTeX{Acro\!\TeX}

% 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{sample}{\myRMFiles/sample.flv}
\makePoster[hiresbb]{aebmovie_poster}{aebmovie_poster}

\newcommand{\wrtTxt}[1]{this.getField("txtCues").value="#1"}

\def\myCuePoints{%
    {type=nav,name=Chapter1,time=0,action={\wrtTxt{Boy rides bike}}},%
    {type=nav,name=Chapter2,time=1900,action={\wrtTxt{Boy slides down}}},%
    {type=nav,name=Chapter3,time=5200,action={\wrtTxt{Boy crawls through tunnel}}},%
    {type=nav,name=Chapter4,time=6800,action={\wrtTxt{Boy spins cubes}}},%
    {type=nav,name=Chapter5,time=9100,action={\wrtTxt{Boy runs through playground}}},%
    {type=nav,name=Chapter6,time=12200,action={\wrtTxt{End of movie, bye-bye, boy}}}
}

\begin{document}

\maketitle

\begin{center}
\resizebox{.75\linewidth}{!}{%
    \rmAnnot[poster=aebmovie_poster,cuepoints={\myCuePoints}]{320bp}{240bp}{sample}}\\[6bp]%
    \textField[\BC{}\Q{1}\Ff{\FfReadOnly}]{txtCues}{.75\linewidth}{11bp}%
\end{center}

The movie is encoded with cue points, we can associate JavaScript actions
with these points by defining the cue points and actions, like so
{\small
\begin{verbatim}
\def\myCuePoints{%
    {type=nav,name=Chapter1,time=0,action={\wrtTxt{Boy rides bike}}},%
    {type=nav,name=Chapter2,time=1900,action={\wrtTxt{Boy slides down}}},%
    ...
    {type=nav,name=Chapter6,time=12200,
        action={\wrtTxt{End of movie, bye-bye, boy}}}}
\end{verbatim}
\par}

The value of the \texttt{action} key is a JavaScript action.
We then pass these cut points to \texttt{\string\rmAnnot} using the
\texttt{cuepoints} key.
\begin{verbatim}
    \rmAnnot[cuepoints={\myCuePoints}]{320bp}{240bp}{sample}
\end{verbatim}
The use of cue points requires version v1.0 (dated 2010/09/24 or later)
for the cue points to work correctly.

\end{document}