• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to make a text or image appear for only a few seconds?

Participant ,
May 25, 2021 May 25, 2021

Copy link to clipboard

Copied

Hi everyone!!

 

I want to set a text (or an image) to appear on a page but for only a few seconds, after an

event takes place. But I don´t know where to start. Can you show me some directions, please?

 

Thanks a lot in advance!

TOPICS
Create PDFs , How to , JavaScript , PDF forms

Views

639

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 25, 2021 May 25, 2021

Yes, it is. The way to do it is to either place them as a part of a field, or to cover them using a field.

Then you can use the setTimeOut method of the app object to show or hide that field after X amount of time.

Here's a simple example. Let's say you have text that you want to show for 5 seconds. Create a (read-only) hidden text field on top of that text with a white fill. Let's call it "CoverText1". Now, under your event you enter this code:

 

var to1 = app.setTimeOut("this.getField(\"CoverT

...

Votes

Translate

Translate
Community Expert ,
May 25, 2021 May 25, 2021

Copy link to clipboard

Copied

Yes, it is. The way to do it is to either place them as a part of a field, or to cover them using a field.

Then you can use the setTimeOut method of the app object to show or hide that field after X amount of time.

Here's a simple example. Let's say you have text that you want to show for 5 seconds. Create a (read-only) hidden text field on top of that text with a white fill. Let's call it "CoverText1". Now, under your event you enter this code:

 

var to1 = app.setTimeOut("this.getField(\"CoverText1\").display = display.visible;", 5000);

 

This will cause the field to become visible after 5 seconds, thereby covering the underlying text beneath it.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Thank you very much for you reply!!

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

You're welcome!

I forgot to mention that you can set that field as hidden when the file is closed, in case you want the text to be visible the next time it is opened.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

LATEST

OK. Thanks for the information!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines