Help with javascript for a pdf presentation

  • Follow


Hi you all,

I'm trying to make a more "dynamic" pdf presentation with some "flash like"
text effects using javascripts in acrobat. Its actually working and I can
sense somehow that the possibilities are endless, but I'm a newbie and my
code is quite rudimentary and is giving me some errors (on repetead
open/close page actions). Maybe some of you could take a look at the
document and the javascripts(document and page levels) and point me in the
appropriate direction. I have attached to the message the .pdf file.

Thanks.

John

Here is the javacode:

 //<Document-Level>
//<ACRO_source>cres</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:cres ***********/
function cres(arg){
global.test = arg;
var f = this.getField("txt_"+(arg+1));
t1rect = f.rect;
t2rect = f.rect;
t1h = t1rect[1]-t1rect[3];
t1w = t1rect[0]-t1rect[2];
t1rect[1] += t1h+35;
t1rect[3] -= t1h-55;
t1rect[0] += t1w+75;
t1rect[2] -= t1w-85;
app.setTimeOut("maremic(global.test,t1rect)",25);
app.setTimeOut("maremic(global.test,t2rect)",125);
}
//</ACRO_script>
//</Document-Level>

//<Document-Level>
//<ACRO_source>maremic</ACRO_source>
//<ACRO_script>
/*********** belongs to: Document-Level:maremic ***********/
function maremic(x,txrect){
this.getField("txt_"+(x+1)).rect=txrect;
this.getField("txt_"+(x+1)).display=display.visible;
}
//</ACRO_script>
//</Document-Level>

//<Page-Actions>
//<ACRO_source>Page2:Page Open:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: Page-Actions:Page2:Page Open:Action1 ***********/
global.cnt_y = 0;
global.bannerRunning_y = 0;
global.bannerKey_y =0;
//</ACRO_script>
//</Page-Actions>

//<Page-Actions>
//<ACRO_source>Page2:Page Open:Action2</ACRO_source>
//<ACRO_script>
/*********** belongs to: Page-Actions:Page2:Page Open:Action2 ***********/
if (global.bannerRunning_y == 0) {
global.bannerRunning_y = 1;
global.bannerKey_y=app.setInterval('cres(global.cnt_y++ % 20)',
175);
stoprun=app.setTimeOut("app.clearInterval(global.bannerKey_y)",3500);
}
//</ACRO_script>
//</Page-Actions>

//<Page-Actions>
//<ACRO_source>Page2:Page Close:Action1</ACRO_source>
//<ACRO_script>
/*********** belongs to: Page-Actions:Page2:Page Close:Action1 ***********/
if (global.bannerRunning_y == 1) {
app.clearInterval(global.bannerKey_y);
global.bannerRunning_y = 0;
}

for (i=1; i<21; i=i+1){
this.getField("txt_"+i).display=display.hidden;
}
//</ACRO_script>
//</Page-Actions>


0
Reply John 4/24/2004 5:11:14 PM


0 Replies
325 Views

(page loaded in 0.019 seconds)

Similiar Articles:













7/21/2012 6:30:06 PM


Reply: