Re: Controlling PDFs in Player Object on Mac

2006-10-14 Thread David Epstein

In case anyone else wonders about this question, I have found a
solution by trial and error.  This may not be the best way (and the
play command, according to the MC help, should be replaced in future
development by the start command, although there is no mention of
start step), but it seems to work:

on pdfToPage n -- show page n of the pdf in player 1
 put round(n) into n -- n as passed by scrollBarDrag doesn't seem to
 -- always be an integer
 put (n-1)*75 into t
 set the playSelection of player 1 to true
 set the startTime of player 1 to t
 set the endTime of player 1 to t+1
 play step player 1
end pdfToPage

(My original question:)


Using MC 2.5 on Mac OSX, I can show a multi-page PDF file in a player
object.  But I can't figure out how to write a script that will
control what page is showing.

For the several example PDF files I've tried, the player's timeScale
is 600 and its duration seems to be something like 75 times (z-1)
where z is the number of pages in the PDF.  But set the currentTime
of player 1 to (n-1)*75 does not consistently cause page n to be
shown.

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: Controlling PDFs in Player Object on Mac

2006-10-14 Thread Ken Ray
On 10/14/06 9:56 AM, David Epstein [EMAIL PROTECTED] wrote:

 In case anyone else wonders about this question, I have found a
 solution by trial and error.  This may not be the best way (and the
 play command, according to the MC help, should be replaced in future
 development by the start command, although there is no mention of
 start step), but it seems to work:
 
 on pdfToPage n -- show page n of the pdf in player 1
   put round(n) into n -- n as passed by scrollBarDrag doesn't seem to
   -- always be an integer
   put (n-1)*75 into t
   set the playSelection of player 1 to true
   set the startTime of player 1 to t
   set the endTime of player 1 to t+1
   play step player 1
 end pdfToPage

That's great, David! Cool tip...

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard