Good afternoon. Many thanks, this solves the problem -- at least partially. The frames are `walking' now, but new problems appeared. I found that when I set `clickin=...', it is set it automatically to `clickout' as well, so one mouse click runs the JavaScript code twice. So I've set it this way: \definefieldstack[fgolds2] [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2] [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=] It's better, but I found that now frames are walking in a strange order. It is rather puzzling, since when it is invoked by \goto{...}[JS(...)], it works well. Moreover, it does different things at AdobeReader 7.x under Linux, and Acrobat 4.x under Windoze. Can you help me to solve it? Many thanks once more. M.K.
Michal Kvasnička wrote:
Good afternoon.
Many thanks, this solves the problem -- at least partially. The frames are `walking' now, but new problems appeared. I found that when I set `clickin=...', it is set it automatically to `clickout' as well, so one mouse click runs the JavaScript code twice. So I've set it this way:
\definefieldstack[fgolds2] [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2] [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=]
It's better, but I found that now frames are walking in a strange order. It is rather puzzling, since when it is invoked by \goto{...}[JS(...)], it works well. Moreover, it does different things at AdobeReader 7.x under Linux, and Acrobat 4.x under Windoze.
Can you help me to solve it?
Mhh, looks like you are going new ways with making the fieldstack interactive (maybe not intended?). Sorry, but I can't help you any further in this direction. Another possibility that I can think of is to add an invisible button field (same dimensions) behind a normal fieldstack, that calls JS(Walk_Field...). Should cause no conflicts with the readonly (non interactive) fieldstack [but this is untested!]. You can simply check this with a button beside the fieldstack and if this works ok, you can use \nointerlineskip \smashedvbox{YOUR WALKBUTTON FIELD}% \placefigure[here]{none}{\fieldstack[fgolds3]} to place it under your fieldstack. HTH, Peter
Many thanks once more. M.K.
Peter Rolf wrote:
Michal Kvasnička wrote:
Good afternoon.
Many thanks, this solves the problem -- at least partially. The frames are `walking' now, but new problems appeared. I found that when I set `clickin=...', it is set it automatically to `clickout' as well, so one mouse click runs the JavaScript code twice. So I've set it this way:
\definefieldstack[fgolds2] [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2] [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=]
It's better, but I found that now frames are walking in a strange order. It is rather puzzling, since when it is invoked by \goto{...}[JS(...)], it works well. Moreover, it does different things at AdobeReader 7.x under Linux, and Acrobat 4.x under Windoze.
Can you help me to solve it?
Mhh, looks like you are going new ways with making the fieldstack interactive (maybe not intended?). Sorry, but I can't help you any further in this direction.
Another possibility that I can think of is to add an invisible button field (same dimensions) behind a normal fieldstack, that calls JS(Walk_Field...). Should cause no conflicts with the readonly (non interactive) fieldstack [but this is untested!]. You can simply check this with a button beside the fieldstack and if this works ok, you can use
\nointerlineskip \smashedvbox{YOUR WALKBUTTON FIELD}% \placefigure[here]{none}{\fieldstack[fgolds3]}
to place it under your fieldstack.
Bad news... I just tested this and it works only as long as you don't stack the button and the fieldstack. The only solution I have found, is to seperate the interaction button into a pdf layer. Things work as desired (you need a context version not older than 2 month), but there are still some problems with spurious spaces. Example is attached. Greets, Peter
HTH, Peter
Many thanks once more. M.K.
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
% interface=en output=pdftex
% Time-stamp:
there are still some problems with spurious spaces.
Just on the off chance that it's the same problem I had with some section numbers getting an extra space before them (in pdf mode): If you are running pdf(e)tex 1.21, you might need the patch below; then remake the formats. I think (but haven't tried it myself) that pdftex 1.30 wants the original spacings (i.e. don't apply the patch in that case). See http://www.ntg.nl/pipermail/ntg-context/2006/017388.html diff -r f6897ee163d2 -r 5ff7b6430984 tex/context/base/enco-pfr.tex --- a/tex/context/base/enco-pfr.tex Fri Apr 14 14:45:01 2006 -0400 +++ b/tex/context/base/enco-pfr.tex Fri Apr 14 14:51:47 2006 -0400 @@ -188,7 +188,7 @@ \else\ifcsname\pdffontfileresource\endcsname % is there a resource already included \doifsomething\pdffontfileresource - {\pdfobj reserveobjnum {}% + {\pdfobj reserveobjnum{}% \setxvalue\pdffontresource{\the\pdflastobj}% \flushatshipout{\dododoincludepdffontresource{\currentencoding}}}% % \doglobal\appendetoks @@ -216,7 +216,7 @@ {\expandafter\ifx\csname\pdffontresource\endcsname\relax \expandafter\ifx\csname\pdffontfileresource\endcsname\relax\else \doifsomething\pdffontfileresource - {\pdfobj reserveobjnum {}% + {\pdfobj reserveobjnum{}% \setxvalue\pdffontresource{\the\pdflastobj}% \flushatshipout{\dododoincludepdffontresource{\currentencoding}}}% % \doglobal\appendetoks
Thanks Sanjoy for pointing this out. Both problems are still *unfixed* (beta from 17.04). Unfortunately fixing them doesn't solve my problem. I'll try it again later. Maybe I was to tired yesterday to solve this and the error is on my side... Greets, Peter Sanjoy Mahajan wrote:
there are still some problems with spurious spaces.
Just on the off chance that it's the same problem I had with some section numbers getting an extra space before them (in pdf mode):
If you are running pdf(e)tex 1.21, you might need the patch below; then remake the formats. I think (but haven't tried it myself) that pdftex 1.30 wants the original spacings (i.e. don't apply the patch in that case). See http://www.ntg.nl/pipermail/ntg-context/2006/017388.html
diff -r f6897ee163d2 -r 5ff7b6430984 tex/context/base/enco-pfr.tex --- a/tex/context/base/enco-pfr.tex Fri Apr 14 14:45:01 2006 -0400 +++ b/tex/context/base/enco-pfr.tex Fri Apr 14 14:51:47 2006 -0400 @@ -188,7 +188,7 @@ \else\ifcsname\pdffontfileresource\endcsname % is there a resource already included \doifsomething\pdffontfileresource - {\pdfobj reserveobjnum {}% + {\pdfobj reserveobjnum{}% \setxvalue\pdffontresource{\the\pdflastobj}% \flushatshipout{\dododoincludepdffontresource{\currentencoding}}}% % \doglobal\appendetoks @@ -216,7 +216,7 @@ {\expandafter\ifx\csname\pdffontresource\endcsname\relax \expandafter\ifx\csname\pdffontfileresource\endcsname\relax\else \doifsomething\pdffontfileresource - {\pdfobj reserveobjnum {}% + {\pdfobj reserveobjnum{}% \setxvalue\pdffontresource{\the\pdflastobj}% \flushatshipout{\dododoincludepdffontresource{\currentencoding}}}% % \doglobal\appendetoks
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
From: Peter Rolf
Both problems are still *unfixed* (beta from 17.04).
The one I pointed out doesn't have an obvious solution since (I think) the reserveobjnum spacing change breaks with pdftex 1.30 but is needed with pdftex 1.21. I guess the magic line could be wrapped in a test for pdftexminorversion or something like that (and that wrapped in a test for using pdftex at all). -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
Michal Kvasnička wrote:
Good afternoon.
Many thanks, this solves the problem -- at least partially. The frames are `walking' now, but new problems appeared. I found that when I set `clickin=...', it is set it automatically to `clickout' as well, so one mouse click runs the JavaScript code twice. So I've set it this way:
\definefieldstack[fgolds2] [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2] [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=]
It's better, but I found that now frames are walking in a strange order. It is rather puzzling, since when it is invoked by \goto{...}[JS(...)], it works well. Moreover, it does different things at AdobeReader 7.x under Linux, and Acrobat 4.x under Windoze.
Can you help me to solve it?
Took some time, but it works now. What I don't understand, is the strange behaviour of the offset parameter in this case. See attached file. Greets, Peter
Many thanks once more. M.K.
% interface=en output=pdftex
% Time-stamp:
Peter Rolf wrote:
Michal Kvasnička wrote:
Good afternoon.
Many thanks, this solves the problem -- at least partially. The frames are `walking' now, but new problems appeared. I found that when I set `clickin=...', it is set it automatically to `clickout' as well, so one mouse click runs the JavaScript code twice. So I've set it this way:
\definefieldstack[fgolds2] [sgolds1,sgolds2a,sgolds2b,sgolds2c,sgolds2d,sgolds2] [frame=off,option=,clickout=JS(Walk_Field{fgolds3}),clickin=]
It's better, but I found that now frames are walking in a strange order. It is rather puzzling, since when it is invoked by \goto{...}[JS(...)], it works well. Moreover, it does different things at AdobeReader 7.x under Linux, and Acrobat 4.x under Windoze.
Can you help me to solve it?
Took some time, but it works now. What I don't understand, is the strange behaviour of the offset parameter in this case. See attached file.
Greets, Peter
Many thanks once more. M.K.
------------------------------------------------------------------------
% interface=en output=pdftex % Time-stamp:
% \setupinteraction[state=start] \setupcolors[state=start] \starttext
\tracefieldstrue
\switchtobodyfont[96pt]
\def\FS#1{\framed[width=4cm,height=4cm,strut=no]{\red\bf#1}}%
\definesymbol [empty] []
\definesymbol [one] [\FS{1}] \definesymbol [two] [\FS{2}] \definesymbol [three] [\FS{3}] \definesymbol [four] [\FS{4}] \definesymbol [five] [\FS{5}]
\setupfield[interaction] [width=4cm,height=4cm, % frame=off, framecolor=blue, offset=none,% default offset causes different positioning of walk button and fieldstack clickin=JS(Walk_Field{sequence})]
\definefield[Walk][check][interaction][empty][empty]
\definefieldstack[sequence] [one,two,three,four,five] [frame=off, offset=none,% default offset causes different positioning of walk button and fieldstack clickin=JS(Walk_Field{sequence})] ^^^^
oeps, this one is obsolete
\defineproperty[interaction][layer][title=walkfield, state=start]
\vbox{\forgetall \nointerlineskip\smashedvbox{\fieldstack[sequence]}% % \startproperty[interaction]% \nointerlineskip\field[Walk] \stopproperty% }
\blank[2cm] \showfields
\stoptext
%%% Local Variables: %%% mode: context %%% TeX-master: "" %%% End:
------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (3)
-
Michal Kvasnička
-
Peter Rolf
-
Sanjoy Mahajan