How to Add a Delay Between Multimedia Actions in Adobe Acrobat
Question details
The user wants to trigger one multimedia clip, wait for a specified number of milliseconds, and then play a second clip using a single button click.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating interactive PDF documents where sequential multimedia playback needs to be triggered by a single user action.
- Observed behavior
- Acrobat button actions execute as a rapid sequence without waiting, and basic JavaScript timeouts do not reliably pause the action queue while the first clip is playing.
Ensure you have access to Adobe Acrobat Pro to edit interactive elements and JavaScript, and verify that your target audience uses PDF viewers that fully support rich media and document-level JavaScript execution.
Use Document-Level JavaScript and app.setTimeOut
Using JavaScript to control both clips and handle the timing offers more reliability than relying on Acrobat's default sequential button action queue.
Because Acrobat processes sequential button actions almost instantaneously, relying on a standard action list will cause both media clips to trigger at the same time. Writing a custom script using the app.setTimeOut method allows you to pause the execution of the second command.
Right-click the interactive button in your PDF document and select "Properties" to open the configuration window.
Navigate to the "Actions" tab. From the "Select Action" dropdown menu, choose "Run a JavaScript" and click "Add".
Input a script that commands the first rendition to play, followed by an app.setTimeOut function (e.g., app.setTimeOut("playSecondClip()", 5000);) to call a document-level function that plays the second clip after a 5000-millisecond delay.
Click "OK" to save the script, close the properties window, exit form editing mode, and click the button to test if the delay works as expected.

Use Separate Buttons for Each Multimedia Clip
If JavaScript timeouts fail due to viewer restrictions or complex media requirements, splitting the actions into separate, user-triggered buttons ensures reliable playback.
Edit and Manage PDFs Easily with WPS Office
While scripting complex multimedia sequences in Adobe Acrobat can be difficult and prone to compatibility issues, WPS Office offers a free, lightweight, and comprehensive suite for all your document needs, including a powerful PDF editor. Enjoy seamless format compatibility, a familiar user interface, and cross-device support without the heavy subscription fees.
- 1. Download WPS Office: Visit the official WPS website and download the free installer for your operating system.
- 2. Install the Suite: Run the setup file and follow the on-screen instructions to install WPS Office on your device quickly.
- 3. Open Your PDF: Launch WPS Office and open your PDF document to view, edit, or annotate with a smooth, user-friendly interface.

Frequently Asked Questions
Why doesn't a standard JavaScript pause work in Acrobat button actions?
Standard button action queues in Acrobat do not inherently wait for media to finish playing, nor do they pause for a standard JavaScript loop to complete before firing the next action in the list. They execute almost simultaneously, requiring specific timer methods like app.setTimeOut to force a delay.
Will this multimedia delay script work on mobile PDF readers?
Generally, no. Most mobile PDF viewers (such as default iOS or Android readers) have limited or no support for complex document-level JavaScript and rich media renditions. Scripts containing app.setTimeOut are usually ignored on these platforms.
Can I play two audio clips simultaneously instead of delaying one?
Yes, you can add multiple "Play Media" actions to a single button without any delay scripting. Depending on the PDF viewer's audio and media capabilities, this usually triggers both clips to start playing at exactly the same time.




