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!
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
...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.
Copy link to clipboard
Copied
Thank you very much for you reply!!
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.
Copy link to clipboard
Copied
OK. Thanks for the information!!