\documentclass{article}
\usepackage[usetemplates,pro,usesf]{web}
\usepackage{eforms}
\usepackage{fc_arith} % showkeypadlink
\margins{.25in}{.25in}{.25in}{.25in}
\screensize{4.3in+25bp}{4.4in}
\textBgColor{webyellow}

\DeclareDocInfo
{
    university={\AcroTeX.Net},
    title={PDF Flash Card: Arithmetic},
    author={D. P. Story, AcroTeX.Net, Northwest Florida State College, The University of Akron},
    email={dpstory@acrotex.net},
    subject={Practice elementary arithmetic operations},
    talksite={\url{www.acrotex.net}},
    version={1.0},
    keywords={AcroTeX.Net, arithmetic, flash cards},
}

\DeclareArithParams
{%
    addT={[2,20]},addB={[5,30]},
    subT={[1,5]},subB={[5,10]},
    mulT={[1,12]},mulB={[1,10]},
    divQ={[1,4]},divB={[1,10]}
}

%
% Optionally insert a logo in the upper right corner using \rheader (part of the running header.
%
\rheader{\parbox[t]{.5in}{\kern0pt\includegraphics[width=\linewidth]{graphics/nwfsc_logo}}}

\begin{MenuFC}
    \fcOptionsMenuItem
    \fcToggleKeypadMenuItem
    \fcMouseKPMenuItem
    \fcTouchKPMenuItem
    \item{title=AcroTeX.Net Home,return=acrotexhome}
    \item{title=AcroTeX.Net Blog,return=acrotexblog}
    \fcAboutFC
\end{MenuFC}

% In this example, when processCustomFcMenu is called n should be 5. An arbitrary
% list of menu items may be specified and processed in this way.
\begin{insDLJS}{cmfc}{Custom Menu Events}
function processCustomFcMenu(n) {
    switch(n) {
        case "acrotexhome":
            app.launchURL("http://www.acrotex.net",false);
            break;
        case "acrotexblog":
            app.launchURL("http://blog.acrotex.net",false);
            break;
    }
}
\end{insDLJS}


\parskip0pt\parindent0pt

\begin{document}

\begin{center}

{%
    \LARGE\bfseries\color{blue}PDF Flash Cards\\[1ex]Elementary Arithmetic
}

%
% The arithmetic problem, \arithProb: top, bottom and operation. This command is REQUIRED.
% This command generates three text fields stacked so that form a standard arithmetic
% problem:     top
%          op  bot
%

\arithProb

%
% \alertbox is a text field where a right or wrong message is written--REQUIRED
% \startAgain clears the statistics field, re-initializes a variables--REQUIRED
% \inputRegion is where the user enters his/her answer--REQUIRED
% \Keypad allows user to enter answer with mouse--OPTIONAL
% \newCard random selects a new arithmetic problem (add, sub, mul, div) depending on the
%   combo box \cbOperation, described below.
%
% These components can be moved around to a new design, thought I don't know what that would
% be.  I have no imagination for design myself.

\ifxetex\vskip-4bp\fi
\mbox{\vbox{\smash{\alertbox}\startAgain}\fcSep\inputRegion\fcSep\vbox{\smash{\raisebox{0bp}{\Keypad}}\newCard}}%

\medskip
%
% \cbTiming is combo box use to set a time limit on answer the problem--OPTIONAL
%   There is also a package option, notimedscores, that removes timing calculations
%   from the PDF, no statistics, no alerts. The option notimedscores makes the combo
%   box created y \cbTiming into a readonly field.
%
% \ansField is the field the user enters his/her answer into---REQUIRED
% \cbOperation a combo box to select what operation to use---REQUIRED

\ifxetex\vskip-4bp\fi
\mbox{\cbTiming\fcSep\ansField\fcSep\cbOperation}

\medskip

%
% This calculation computes the width of the previous row of fields, and sets \cs{fcWidth},
% a dimension in this package, to that width.
%
\settowidth{\fcWidth}{\cbTiming\fcSep\ansField\fcSep\cbOperation}
%
% \statsFields is a collection of text fields to display user statistics---OPTIONAL
%
\ifxetex\vskip-4bp\fi
\makebox[\fcWidth][s]{\statsFields}

\end{center}
\end{document} 