From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21242 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Re: Animations in ConTeXt Date: Thu, 07 Jul 2005 23:33:04 +0200 Message-ID: <42CD9F90.40606@wxs.nl> References: <1116757157.13109.9.camel@drr.elaphus> <429218EE.1040908@boede.nl> <6faad9f00505241107123dc407@mail.gmail.com> <42CD4F8F.8050408@wxs.nl> <42CD984D.3010800@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040502020104030600090403" X-Trace: sea.gmane.org 1120772001 17179 80.91.229.2 (7 Jul 2005 21:33:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2005 21:33:21 +0000 (UTC) Cc: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 07 23:33:19 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1DqdzK-00080g-Gc for gctc-ntg-context-518@m.gmane.org; Thu, 07 Jul 2005 23:32:54 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 112C31279B; Thu, 7 Jul 2005 23:32:54 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26339-03; Thu, 7 Jul 2005 23:32:49 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1CDC5127A2; Thu, 7 Jul 2005 23:32:49 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 27F96127A2 for ; Thu, 7 Jul 2005 23:32:48 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26415-03 for ; Thu, 7 Jul 2005 23:32:47 +0200 (CEST) Original-Received: from mailrelay01.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 389151279B for ; Thu, 7 Jul 2005 23:32:47 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j67LWdOJ030757; Thu, 7 Jul 2005 23:32:39 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id D79DD31213; Thu, 7 Jul 2005 22:56:51 +0200 (CEST) Original-Received: from [10.100.1.53] (unknown [10.100.1.53]) by server-1.pragma-net.nl (Postfix) with ESMTP id 89BFA2F48B; Thu, 7 Jul 2005 20:56:50 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: Mojca Miklavec In-Reply-To: <42CD984D.3010800@gmail.com> X-Virus-Scanned: ClamAV 0.86.1/971/Thu Jul 7 12:08:01 2005 on mailrelay01 X-Virus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21242 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21242 This is a multi-part message in MIME format. --------------040502020104030600090403 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mojca Miklavec wrote: > Yes, in the meantime I noticed that too. Acrobat 5 doesn't support those > JS stuff at all, but the funny thing is that Acrobat 6 supports only a > half of it. I was already running a continuous animation in Acrobat 6 > (the one mentioned above), however it was compiled from plain TeX and I > don't know how to include the fields in the same way in ConTeXt and how > to write the same JS code for them. timers were added in version 6 > JS(Rotate_Star) didn't work in Acrobat 6, but I don't want to care about > the bugs in Adobe products. They will never be removed (if ever) as soon > as the bugs are removed from ConTeXt :) currently in acrobat you can use catch to make sure that the document at least opens ok here is the deal: - i add the attached (a bit old and rusty) file to the distribution - and you add an animation page to the wiki (you probably recognize the result if you process it) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- --------------040502020104030600090403 Content-Type: application/x-tex; name="pdfclock.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pdfclock.tex" %D \module %D [ file=pdfclock, %D version=2001-09-27, %D title=\CONTEXT\ Example File, %D subtitle=Clock, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. \setupoutput [pdftex] \definepapersize [clock] [width=2.5cm, height=2.5cm] \setuppapersize [clock][clock] \setuplayout [header=0pt, footer=0pt, backspace=.25cm, topspace=.25cm, width=middle, height=middle] \setupinteraction % closeaction fails here [state=start, closeaction=JS(stop_clock), closepageaction=JS(stop_clock)] \setupcolors [state=start] \startJSpreamble stepper used now var state = 0 ; var more = 0 ; var step = 0 ; function step_clock () { try { if (more==60) { more = 0 ; Walk_Field("more") } more += 1 ; Walk_Field("clock") ; this.dirty = false } catch (e) { } } function start_clock () { try { if (state==0) { step = app.setInterval ("step_clock()", 1000) ; step.count = 0 ; state = 1 } else if (state==1) { app.clearInterval (step) ; state = 2 } else if (state==2) { app.clearInterval (step) ; Reset_Fields("more") ; Reset_Fields("clock") ; Set_Field("more", "1") ; Set_Field("clock", "1") ; more = 0 ; state = 0 } } catch (e) { } } function stop_clock () { try { app.clearInterval (step) } catch (e) { } } \stopJSpreamble \startreusableMPgraphic{common} drawoptions(withpen pencircle scaled 1mm withcolor .4white) ; fill fullsquare scaled 2.5cm ; drawoptions(withpen pencircle scaled 1mm withcolor .7green) ; draw fullsquare scaled 2.5cm ; drawoptions(withpen pencircle scaled 1mm withcolor .7red) ; draw fullcircle scaled 2cm ; drawoptions(withpen pencircle scaled 2mm withcolor .7yellow) ; for i=1 upto 12 : draw (0,1cm) rotated ((i-1)*(360/12)) ; endfor ; \stopreusableMPgraphic \startuseMPgraphic{clock} numeric stp ; stp := (\MPvar{n}-1)*(360/60) ; pair p ; p := (0,\MPvar{l}-.5mm) ; drawoptions(withpen pencircle scaled 1mm withcolor .7\MPvar{c}) ; draw (origin -- p) rotated -stp ; draw (p shifted (-2mm,-2.5mm)--p--p shifted (2mm,-2.5mm)) rotated -stp ; setbounds currentpicture to fullsquare scaled 2cm ; drawoptions(withpen pencircle scaled 2mm withcolor .7white) ; draw origin ; \stopuseMPgraphic \defineoverlay [common] [\reuseMPgraphic{common}] \defineoverlay [start] [\overlaybutton{JS(start_clock)}] \setupbackgrounds [page] [background={common,start}] \let\clocklist\empty \let\morelist \empty \dorecurse{60} {\appendtocommalist{step:\recurselevel}\clocklist \expanded {\definesymbol[step:\recurselevel] [\noexpand\useMPgraphic {clock}{n=\recurselevel,l=1cm,c=blue}]} \appendtocommalist{more:\recurselevel}\morelist \expanded {\definesymbol[more:\recurselevel] [\noexpand\useMPgraphic {clock}{n=\recurselevel,l=.75cm,c=green}]}} \expanded {\definefieldstack [clock] [\clocklist] [width=2cm,height=2cm,offset=overlay,frame=off]} \expanded {\definefieldstack [more] [\morelist] [width=2cm,height=2cm,offset=overlay,frame=off]} \starttext \startoverlay {\fieldstack[more]} {\fieldstack[clock]} \stopoverlay \stoptext --------------040502020104030600090403 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --------------040502020104030600090403--