Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

360

Likes

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

Adobe Community Professional , 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...

Likes

Translate

Translate
Adobe Community Professional ,
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.

 

Likes

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!!

 

Likes

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
Adobe Community Professional ,
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.

Likes

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!!

Likes

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