Copy link to clipboard
Copied
Here is my ongoing quest -- recently SOLVED, up to the point of delaying display of an Alert, by using setTimeOut. Now I seek to achieve delaying display of an RMA, similarly.
Here's where I need help. My comprehension of ActionScript is still vague. I have been able to, in a scrpt, Play an RMA, by using an rm.callAS operation. This works, as seen with 'First Clip' on the left side of attached document:
var aRM = this.getAnnotsRichMedia(0); // var used to ID any Clip on first page (PDF document page# minus 1)
//
var rm = aRM[0]; // get rich media annot for First Clip [RM List Position# minus 1]
//
if ( !rm.activated ) rm.activated=true; // activate the Clip-annot
rm.callAS("multimedia_play"); // play First Clip, right away
The 'Second Clip', on the right side, is to play, following a 2.0 sec. delay:
var aRM = this.getAnnotsRichMedia(0); // var used to ID any Clip on first page (PDF document page# minus 1)
//
var rm = aRM[1]; // get rich media annot for Second Clip [RM List Position# minus 1]
//
if ( !rm.activated ) rm.activated=true; // activate the Clip-annot
//
app.setTimeOut (rm.callAS("multimedia_play"), 2000 ); // Play Second Clip, after 2000 milliseconds
I can well imagine problems exist in my comingling of app.Methods, and callAS commands.
Comentary appreciated.
Copy link to clipboard
Copied
Thom Parker already replied in your other thread and correctly mentioned that the first parameter of the setTimeOut method needs to be a string, and it needs to contain your full code. It can reference variables that were declared earlier (if done at the same or a higher scope), but it's better to place all of your code in this parameter. Alternatively, you can place the code in a function and then just call that function, but it still needs to be in the form of a string.
Copy link to clipboard
Copied
Surprisingly, your code does work... So I'm not sure what the issue is.
Copy link to clipboard
Copied
Use this:
app.setTimeOut ('rm.callAS("multimedia_play")', 2000 );
Copy link to clipboard
Copied